Repository navigation
fix(relinker): ignore unwind records that cover no code - #6619
Conversation
An FDE whose address range is 0 describes no instructions, and an unwinder never matches a pc in it. The exception-table reader rejected it with "inconsistent FDE function range", which stopped the conversion of Limbo (CUSA01664): one of its 17328 FDEs covers 0 bytes at 0x47dd0, where the next record starts. Such a record is now read and left out of the function list.
|
Independent Linux and native macOS parser coverage for exact head
One small extra regression is worth keeping: a zero-sized FDE whose start disagrees with its header entry. In a scratch production copy, returning an empty region immediately after reading auto bytes = Fixture();
Io::WriteU64(bytes, 112, 0);
Io::WriteU64(bytes, 16, 0x2001);
bool rejected = false;
try { Relinker::UnusedNidFilter::ReadExceptionFunctions(bytes, {load, eh}, {}, {}); }
catch (const std::exception&) { rejected = true; }
Require(rejected);No repository source changed. Scope: the production exception-table reader and synthetic byte fixtures; no full relinker/CTest build, Limbo conversion, guest execution or Rosetta run. The existing Windows title-conversion evidence remains the title evidence. |
|
Second-title data point: Hasbro Family Fun Pack (CUSA03312, my own dump) needs this PR, on Linux and Windows. Relinker-only Release build, Windows 11 Pro 26300, WinLibs GCC 15.2.0 r7. Starting from The other members each stop at their own step, so every one of them is needed for this title; the whole table is on #6977. AI-assisted: yes (Claude Code) |
|
Checked: a zero-range FDE is still read and validated (start vs |
What
An FDE whose address range is 0 describes no instructions, and an unwinder never matches a pc in it. The exception-table reader rejected one, which stopped the conversion of Limbo (CUSA01664) on
main5d9dcc42d:One of Limbo's 17328 FDEs covers 0 bytes at 0x47dd0, where the next record starts. Such a record is now read and validated as before, but left out of the function list. A record whose start differs from the
.eh_frame_hdrentry, or whose range overflows, is still rejected. Part of the PS4 work tracked in #3093.Tested
Windows 11 Pro 26200, WinLibs GCC 15.2.0 r7, Release, on
main5d9dcc42d:unwind_record_boundshas a new case: the fixture's FDE with a range of 0 reads as no functions. Each of these makes it fail: rejecting the record as before, and keeping it as an empty function.-DANYPS5_RELINKER_ONLY=ON): 177 of 177 tests pass. The relinker it builds gets Limbo past this record to its inline jump tables, which fix(relinker): skip jump tables placed after a function's code #6618 handles; with both, Limbo converts.tools/check_conventions.pypasses.Not tested on Linux or macOS hosts.
Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code