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>
This commit is contained in:
Valiantsin DzerakhandClaude Opus 5.5 committed 2026-11-12 07:47:32 +03:00
1 parent d8a1d14104
commit b80a568df5
3 files changed
+12 -1

No files matched your search

+1 -1
View File
@@ -49,7 +49,7 @@ GPU semantics behind the graphics rows: [maxwell.md](../maxwell.md). The method
| a host core at 100% while the game waits | game spin loops without system calls | profile: which guest function spins |
| crash on world load | sizes the game reads from the driver (command memory used) differ from the console's | the sizes the game asks for against the console's |
| crash with one save only | the save itself; some crash on a real Switch | the same save on another build and, if possible, on hardware |
| random crash after minutes to hours, access violation reading `0xffffffffffffffff` in a game function | an invalid value (-1, `0xffff0000ffffffff`) in an optional reference the game checks only for null; set `optref` in `recomp/patches-v143.txt` guards main+0x1bd0138 | the crash dump's faulting host instruction, the register it loads through and the field that register came from |
| random crash after minutes to hours, access violation reading `0xffffffffffffffff` or a small address such as `0x90` in a game function | an invalid value (-1, `0xffff0000ffffffff`) in an optional reference the game checks only for null, or a freed holder whose first word reads as a small number; set `optref` in `recomp/patches-v143.txt` guards main+0x1bd0138 for both | the crash dump's faulting host instruction, the register it loads through and the field that register came from |
## Device lost, hangs, black window