Commit Graph
8 Commits
Author SHA1 Message Date
Valiantsin DzerakhandClaude Opus 5.5 e6839387fc Merge task/abilityguard: a stale Recall / Ultrahand target is dropped only where the game would fault on it, replacing the 4 GiB target check, and the model scene report loop gets a bound (#1005, #1137, #1145)
The ability guard (runtime/ov_ability.c) checks the holder, the actor, its component and the reference word the game
writes, so it catches every bad target seen in the reports: -1, 0x80, an empty bounding box (FLT_MAX) and a vtable in
main's data. The optref site at main+0x1bd01c8 (1.2.1: 0x1622bf4) is dropped: set ability patches the same address and
must win there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 19:57:07 +03:00
Valiantsin DzerakhandClaude Opus 5.5 357d148066 Merge pull request #1128: the chunked replay no longer freezes or crashes in chunk_record with replay_workers above 0, the target history's oldest-way search stays in its set (ipavlin98) (#1104)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 07:57:00 +03:00
Valiantsin DzerakhandClaude Opus 5.5 b80a568df5 Treat a target below 4 GiB behind the optional reference at object +0x6b0 as absent, so the freed-holder crash in main+0x1bd0138 stops on 1.4.3 and 1.2.1 (#1005)
The holder of the PlayerVirtualKey request can be freed while the request still points at it; its first word then reads
as a small number and the game dereferences it as the target actor. No guest object lives below 2^32, so such a target
now takes the game's own branch for a null target. Same TOTK_OPTREF_GUARD switch as the existing optref site.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 07:47:32 +03:00
ipavlin98 3a8f93c64b Pick the oldest way of a target history set by index from the set's start, so a new target no longer overwrites the chunked replay's state (#1104)
tfr_note moved its pointer inside the search loop, so each later way was counted from the way it had picked and the
search could step up to 20 entries past the set. From the last set it wrote the new entry into RP, which follows the
table: the image handle into the take word, which left the submitting thread waiting in chunks_submit for a chunk no
recording thread took (a freeze with replay_workers above 0), and level and layer into the handle list, which crashed
chunk_record reading address 0x8. --probe-vkexec gets a part that stamps a set's ways so the old search left it.
2026-11-11 23:51:01 +03:00
Valiantsin DzerakhandClaude Opus 5.5 5d8c2ceb30 Drop an ability target only where the game would fault on it, and keep the live-actor test as a log line (#1005)
The game links an actor whose link record is null without complaint, so UltraTears' live-actor test could drop
targets the game handles. A target is now dropped only when the holder, the actor or its component is unreadable, or
the word the game's reference takes (+0x90, an atomic read-modify-write) is unreadable or in a module's code or
read-only data. The live-actor test logs the targets it would reject and changes nothing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 16:59:35 +03:00
Valiantsin DzerakhandClaude Opus 5.5 dde624e603 Skip a stale Recall / Ultrahand target and an unbounded model scene report row instead of crashing (#1005)
Set ability (1.4.3 main+0x1bd01c4, 1.2.1 main+0x1622bf0): the target actor load becomes a host call that reads the
holder safely and drops an actor failing the live-actor test (link record points back and carries its id), as
UltraTears found; the game's own cbz skips it for that frame. The answer comes back in x9, since the lifted code keeps
x21 in a C local across calls. Set report (1.4.3 only): the model scene report loop sends a negative handle or a row
index from 0x8000 to the game's handle reset, the class Weeping of the Empire met (#52, #73). Both on by default,
TOTK_ABILITY_GUARD=0 / TOTK_REPORT_GUARD=0 turn them off.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 16:41:29 +03:00
Valiantsin DzerakhandClaude Opus 5.5 507e27da91 Treat an invalid optional reference at object +0x6b0 as absent on 1.4.3, so the random crash in main+0x1bd0138 stops (#1005)
The game checks the reference only for null, and players' crash dumps show it holding 0xffffffffffffffff after minutes to hours of play. MacNativeGames met the same field holding 0xffff0000ffffffff during a save load. Set optref (TOTK_OPTREF_GUARD, on by default) turns the cbz into a test for null or negative; valid holders are heap addresses below 2^63.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 15:26:26 +03:00
Valiantsin DzerakhandClaude Opus 5.5 bdcfb42c07 Add contributor and agent guides for pull requests, running and debugging
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 14:44:59 +03:00