fluffos/testsuite/clone
Claude 0172da2a48 fix: move_object() missing destruct recheck after lazy try_reset()
move_object() (src/vm/internal/simulate.cc) calls try_reset(dest) to
lazily run dest's reset() before linking item into dest's inventory.
reset() is arbitrary LPC and can destruct dest as an entirely ordinary
side effect (not an error(), so safe_apply() inside try_reset() doesn't
catch it) -- move_object() never rechecked O_DESTRUCTED afterward, so
it went on to link item into (and set item->super to) an object that
was no longer live, corrupting the object graph. Mirrors the existing
post-call_create() recheck in clone_object().

Added a gtest (DriverTest.TestMoveObjectDestructDuringReset) since
reproducing this requires direct control over next_reset/the game
tick and the "lazy resets" config flag, which isn't practical to
exercise from the LPC testsuite's fixed boot config.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YTPLudxra3u1andNyWJEQG
2026-07-14 13:37:57 -05:00
..
adv_child_badarr.lpc Add inherit_program / include_file master applies; auto hot-reload demo (#1230) 2026-07-10 10:27:27 -04:00
adv_child_empty.lpc Add inherit_program / include_file master applies; auto hot-reload demo (#1230) 2026-07-10 10:27:27 -04:00
adv_child_emptypath.lpc Add inherit_program / include_file master applies; auto hot-reload demo (#1230) 2026-07-10 10:27:27 -04:00
adv_child_ext.lpc Add inherit_program / include_file master applies; auto hot-reload demo (#1230) 2026-07-10 10:27:27 -04:00
adv_child_loaded.lpc Add inherit_program / include_file master applies; auto hot-reload demo (#1230) 2026-07-10 10:27:27 -04:00
adv_child_self.lpc Add inherit_program / include_file master applies; auto hot-reload demo (#1230) 2026-07-10 10:27:27 -04:00
adv_globals_deny.lpc Add inherit_program / include_file master applies; auto hot-reload demo (#1230) 2026-07-10 10:27:27 -04:00
adv_hook.lpc Add inherit_program / include_file master applies; auto hot-reload demo (#1230) 2026-07-10 10:27:27 -04:00
adv_inc_badarr.lpc Add inherit_program / include_file master applies; auto hot-reload demo (#1230) 2026-07-10 10:27:27 -04:00
adv_inc_multiline.lpc Add inherit_program / include_file master applies; auto hot-reload demo (#1230) 2026-07-10 10:27:27 -04:00
adv_inc_throw.lpc Add inherit_program / include_file master applies; auto hot-reload demo (#1230) 2026-07-10 10:27:27 -04:00
adv_throw.h Add inherit_program / include_file master applies; auto hot-reload demo (#1230) 2026-07-10 10:27:27 -04:00
bad_macro_params.lpc lexer: avoid infinite loop on a malformed #define parameter list 2026-07-11 21:51:57 -04:00
catch_tell_probe.lpc Every efun has a test: ~130 new files close the whole spec inventory 2026-07-09 20:48:48 -04:00
class788_ok.lpc Diagnose 'class Foo { ... } var;' with a targeted error (#788) 2026-07-11 14:56:46 -04:00
class788_repro.lpc Diagnose 'class Foo { ... } var;' with a targeted error (#788) 2026-07-11 14:56:46 -04:00
compile_hook.lpc Add inherit_program / include_file master applies; auto hot-reload demo (#1230) 2026-07-10 10:27:27 -04:00
dual_fail_only_lpc.lpc LPC testsuite: gtest-style harness, ctest registration, high-value pins 2026-07-09 20:48:48 -04:00
dual_inherit_c_spelling.lpc LPC testsuite: gtest-style harness, ctest registration, high-value pins 2026-07-09 20:48:48 -04:00
dual_only_c.c Prefer .lpc source extension; rename testsuite to .lpc 2026-07-09 20:48:48 -04:00
dual_only_lpc.lpc Prefer .lpc source extension; rename testsuite to .lpc 2026-07-09 20:48:48 -04:00
dual_pick_c.c Prefer .lpc source extension; rename testsuite to .lpc 2026-07-09 20:48:48 -04:00
dual_pick_c.lpc Prefer .lpc source extension; rename testsuite to .lpc 2026-07-09 20:48:48 -04:00
dual_pick_default.c Prefer .lpc source extension; rename testsuite to .lpc 2026-07-09 20:48:48 -04:00
dual_pick_default.lpc Prefer .lpc source extension; rename testsuite to .lpc 2026-07-09 20:48:48 -04:00
dual_pick_lpc.c Prefer .lpc source extension; rename testsuite to .lpc 2026-07-09 20:48:48 -04:00
dual_pick_lpc.lpc Prefer .lpc source extension; rename testsuite to .lpc 2026-07-09 20:48:48 -04:00
dual_retry_child.c Testsuite coverage round 2: ctest test named "testsuite"; save_object overflow fixed 2026-07-09 20:48:48 -04:00
dual_retry_child.lpc Testsuite coverage round 2: ctest test named "testsuite"; save_object overflow fixed 2026-07-09 20:48:48 -04:00
dual_retry_parent.lpc Testsuite coverage round 2: ctest test named "testsuite"; save_object overflow fixed 2026-07-09 20:48:48 -04:00
dwlib_long_name.lpc fix: bound replace_objects() buffer copies against master-apply strings 2026-07-14 13:37:57 -05:00
event_probe.lpc Every efun has a test: ~130 new files close the whole spec inventory 2026-07-09 20:48:48 -04:00
ffi_genmath.lpc package_ffi: foreign function interface for LPC (libffi), with callbacks 2026-07-09 20:48:48 -04:00
ffi_probe.lpc package_ffi: foreign function interface for LPC (libffi), with callbacks 2026-07-09 20:48:48 -04:00
if_blocked.h Add inherit_program / include_file master applies; auto hot-reload demo (#1230) 2026-07-10 10:27:27 -04:00
if_denied.lpc Add inherit_program / include_file master applies; auto hot-reload demo (#1230) 2026-07-10 10:27:27 -04:00
if_inline.lpc Add inherit_program / include_file master applies; auto hot-reload demo (#1230) 2026-07-10 10:27:27 -04:00
if_nested.lpc Add inherit_program / include_file master applies; auto hot-reload demo (#1230) 2026-07-10 10:27:27 -04:00
if_outer.h Add inherit_program / include_file master applies; auto hot-reload demo (#1230) 2026-07-10 10:27:27 -04:00
if_real.h Add inherit_program / include_file master applies; auto hot-reload demo (#1230) 2026-07-10 10:27:27 -04:00
if_redirect.lpc Add inherit_program / include_file master applies; auto hot-reload demo (#1230) 2026-07-10 10:27:27 -04:00
inh0.lpc Prefer .lpc source extension; rename testsuite to .lpc 2026-07-09 20:48:48 -04:00
inh1.lpc Prefer .lpc source extension; rename testsuite to .lpc 2026-07-09 20:48:48 -04:00
inh2.lpc Prefer .lpc source extension; rename testsuite to .lpc 2026-07-09 20:48:48 -04:00
ip_child_denied.lpc Add inherit_program / include_file master applies; auto hot-reload demo (#1230) 2026-07-10 10:27:27 -04:00
ip_child_inline.lpc Add inherit_program / include_file master applies; auto hot-reload demo (#1230) 2026-07-10 10:27:27 -04:00
ip_child_inline2.lpc Add inherit_program / include_file master applies; auto hot-reload demo (#1230) 2026-07-10 10:27:27 -04:00
ip_child_nested.lpc Add inherit_program / include_file master applies; auto hot-reload demo (#1230) 2026-07-10 10:27:27 -04:00
ip_child_priv.lpc Add inherit_program / include_file master applies; auto hot-reload demo (#1230) 2026-07-10 10:27:27 -04:00
ip_child_redirect.lpc Add inherit_program / include_file master applies; auto hot-reload demo (#1230) 2026-07-10 10:27:27 -04:00
ip_forbidden.lpc Add inherit_program / include_file master applies; auto hot-reload demo (#1230) 2026-07-10 10:27:27 -04:00
ip_real.lpc Add inherit_program / include_file master applies; auto hot-reload demo (#1230) 2026-07-10 10:27:27 -04:00
ip_real2.lpc Add inherit_program / include_file master applies; auto hot-reload demo (#1230) 2026-07-10 10:27:27 -04:00
login.lpc Prefer .lpc source extension; rename testsuite to .lpc 2026-07-09 20:48:48 -04:00
memory_holder.lpc Prefer .lpc source extension; rename testsuite to .lpc 2026-07-09 20:48:48 -04:00
mgip1.lpc Prefer .lpc source extension; rename testsuite to .lpc 2026-07-09 20:48:48 -04:00
mgip2.lpc Prefer .lpc source extension; rename testsuite to .lpc 2026-07-09 20:48:48 -04:00
mgip3.lpc Prefer .lpc source extension; rename testsuite to .lpc 2026-07-09 20:48:48 -04:00
mgip4.lpc Prefer .lpc source extension; rename testsuite to .lpc 2026-07-09 20:48:48 -04:00
move_object_item.lpc fix: move_object() missing destruct recheck after lazy try_reset() 2026-07-14 13:37:57 -05:00
move_object_reset_dest.lpc fix: move_object() missing destruct recheck after lazy try_reset() 2026-07-14 13:37:57 -05:00
README Migrate buildsystem to CMake (#431) 2019-01-07 20:29:34 -08:00
reclaim_fp_helper.lpc reclaim: stop double-decrementing func_ref for FP_LOCAL funptrs 2026-07-11 21:51:57 -04:00
reload_counter.lpc fix: handle self-destruct during reload_object(), guard free_object() null 2026-07-14 13:37:57 -05:00
reload_self_destruct.lpc fix: handle self-destruct during reload_object(), guard free_object() null 2026-07-14 13:37:57 -05:00
replace_child.lpc Testsuite coverage round 2: ctest test named "testsuite"; save_object overflow fixed 2026-07-09 20:48:48 -04:00
replace_parent.lpc Testsuite coverage round 2: ctest test named "testsuite"; save_object overflow fixed 2026-07-09 20:48:48 -04:00
replaceable_1.lpc Prefer .lpc source extension; rename testsuite to .lpc 2026-07-09 20:48:48 -04:00
replaceable_2.lpc Prefer .lpc source extension; rename testsuite to .lpc 2026-07-09 20:48:48 -04:00
replaceable_inh.lpc Prefer .lpc source extension; rename testsuite to .lpc 2026-07-09 20:48:48 -04:00
shadow_probe.lpc Every efun has a test: ~130 new files close the whole spec inventory 2026-07-09 20:48:48 -04:00
syntax_parent.lpc Syntax coverage matrix; fix name::fn() super calls into .lpc parents 2026-07-09 20:48:48 -04:00
testob1.lpc Prefer .lpc source extension; rename testsuite to .lpc 2026-07-09 20:48:48 -04:00
testob2.lpc Prefer .lpc source extension; rename testsuite to .lpc 2026-07-09 20:48:48 -04:00
testob3.lpc Prefer .lpc source extension; rename testsuite to .lpc 2026-07-09 20:48:48 -04:00
tuidemo_app.lpc Char-mode input: deliver real keystrokes (BS/DEL, whole UTF-8, raw ESC); fix NAWS lost at logon (#1245) 2026-07-11 15:00:36 -04:00
tuidemo_dash.lpc Char-mode input: deliver real keystrokes (BS/DEL, whole UTF-8, raw ESC); fix NAWS lost at logon (#1245) 2026-07-11 15:00:36 -04:00
tuidemo_form.lpc Char-mode input: deliver real keystrokes (BS/DEL, whole UTF-8, raw ESC); fix NAWS lost at logon (#1245) 2026-07-11 15:00:36 -04:00
user.lpc Char-mode input: deliver real keystrokes (BS/DEL, whole UTF-8, raw ESC); fix NAWS lost at logon (#1245) 2026-07-11 15:00:36 -04:00