Repository navigation
RR3 native re-host v0.22.12: the load bias is no longer published before the image is mapped
Pre-releaseReal Racing 3 -- Switch native re-host, v0.22.12
WHAT THIS FIXES
The console crash from 2026-11-10 is closed, and the cause was found by
reproducing the exact build the console ran and running addr2line against it.
commit a5ba9487 rebuilt; nm(__libnx_exception_handler) = 0x8fb60
runtime base = 0x1abfbc5b60 - 0x8fb60 = 0x1abfb36000
pc static 0x836f4 -> rr3::reapDetachedThreadWorker(void*)
native-switch/source/pthread_bridge.cpp:5881
lr static 0x836f0 -> native-switch/source/pthread_bridge.cpp:5872
836ec: bl guestImageContains <- the guard
836f0: tbz w0, #0, 83754 <- the guard's branch
836f4: ldr x26, [x25, x26] <- the faulting instruction
x25 is the guest's load bias (0x59a29c1000), x26 is 0x1f6d5d0 --
the port's own kAssetSingletonElfVa, a guest virtual address -- and the
effective address is 0x59a492e5d0, which is exactly the FAR in the dump.
So the port read a guest address that had no memory behind it.
WHY. The loader publishes the guest's load bias as soon as the image is
LOADED, but at that point the image is only RESERVED: reserveSegmentedTargets()
has claimed a CodeMemory address range and mapProcessCodeImages() has not
mapped it yet. The guard in front of the read, guestImageContains(), asked
the ELF's PT_LOAD table whether the address was in range and never asked
whether the image was mapped -- so it said yes, and the read faulted. The
2026-11-03 crash was the other half of the same bug (there the bias was still
zero and the slot was the raw ELF VA); only that half had been fixed.
guestImageContains() and resolveMainImageLoadBias() are the two doors
every guest-memory reader in the port goes through (guest_rtti,
race_state_probe, guest_action, guest_view_probe's flRead, and the
reaper), so gating both of them on the mapping being live closes the whole
class, not one site of it.
ALSO: the exception class in the dump was being read out of the wrong
field. esr=0x92000005 is EC 0x24 = "Data Abort from a lower Exception
level", with DFSC 0b000101 = "Translation fault, level 1" and WnR = 0, i.e.
an ordinary unmapped read. It is not a pointer-authentication failure:
SPAL is EC 0x0C, whose ESR is 0x3000_00xx. The "SPAL" reading had been
written into the source comment, a commit message and the docs, and it sent
one investigation after TPIDR_EL0 and PAC keys instead of after the unmapped
address. The crash dump now decodes its own ESR, so this cannot be misread
again.
WHAT THE NEXT CRASH FILE WILL TELL YOU
rr3-native-rehost.crash-early.txt now carries three new lines:
| field | what it answers |
|---|---|
fault_class |
the exception in words: data-abort-translation-fault-l1 / data-abort / spal / instruction-abort / unknown |
far_attribution |
whose MEMORY faulted (a guest DSO, port-nro+0x..., or unmapped) -- the pc already says whose CODE ran |
main_image_mapped |
1 or 0: was the guest image mapped when it faulted? A 0 here is the bug in one field. |
HOW TO TEST
- Delete the old "RR3 Native Rehost" icon from the home menu first, then
install this NSP. (Installing over the old one leaves the old icon and
the old launch entry behind, and the two will fight.) - Launch it from the home menu -- no hbmenu, no separate NRO.
- If it crashes, send
rr3-native-rehost.crash-early.txtand
rr3-native-rehost.guest-view.logback. The three new lines are the
point of this release.
ALSO IN THIS RELEASE
- The version is 0.22.12 in all three places it lives (
rr3/version.hpp,
the Makefile, the.nmeta), derived and checked by the contract tests. docs/OPEN-ISSUES.mdsections 9.41 and 9.44.2 are corrected and a new
section 9.46 records the whole finding, including the two wrong readings
that preceded it and why each was wrong.- The image-sized JIT probe was NOT the crash: it succeeded on that console
(create=00000000 exec=00000000 close=00000000). It is left alone. - The 27-to-2 start-lights regression and the 211 compiler warnings are still
open and are not touched by this release.
SUPERSEDES
v0.22.12 replaces v0.22.11 and every earlier release. v0.22.11 carried the
title-id change and the whole RomFS tree, and both of those are still in
here; this release adds the crash fix on top.
SUPERSEDED BY v0.22.13. v0.22.12 carried the crash fix, but an
adversarial review of that fix found three real defects in it: the crash
handler would have heap-allocated on the kernel exception stack, the
reaper's chain of guest pointers after the guarded one was still
dereferenced raw (the same crash, one rung later), and the segmented
mapping path reported itself mapped after its first range. All three are
fixed in v0.22.13. Install v0.22.13.