fix(relinker): preserve LSDA landing pads in filter roots and guard displacement overflow #15896
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/15896"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by slopgobblercobbler on 2026-11-04T22:44:56Z.
What
core/relinker/relinker/src/analysis/CallSiteResolver.cpp, guard against negative displacement underflow and positive displacement overflow when computing RIP-relative call-site instruction target addresses.core/relinker/relinker/src/pipeline/RelinkerPipeline.cpp, ensurefunction.ExtraTargets(personality routines and landing pads) extracted fromunwindFunctionsare preserved inexportedFunctionsfilter roots, without erroneously rooting dead function beginnings.core/relinker/relinker/tests/StrictNidFilterTests.cpp, adddefaultFilterExtraLandingPadRoots()verifying that the default CFG-backed unused NID filter keeps GLOB_DAT imports accessed by LSDA landing pads when passed as extra roots.Tested
strict_nid_filter_testsvia CTest.python tools/check_conventions.py --base upstream/main --head HEAD(0 errors).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)Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-18T10:24:47Z.
Review: COMMENTED
Reviewed — no blocking findings
The review covered head
73e27c8ee54c651f19bd034c2445faddedae7b67; I found no verified blocking defect, but could not run the reported checks.What I ran
Results
Findings
Blocking
None verified.
Non-blocking
None.
Sources
Not verified
UnwindRecordBoundsTests.cppwas not inspected in one complete read; its changed test additions were reviewed from the diff. No changed files were excluded by manifest rule.To get this to a good state
Nothing is required. Run the reported checks on this head if independent verification is needed.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-21T03:37:08Z.
Review: CHANGES_REQUESTED
Reviewed — changes requested
Changes are required before merge: avoid signed overflow when validating an action displacement of
INT64_MIN.What I ran
Reviewed head
8ca26db603fff8d94bb1d3c6fd8f441248a6e486. No commands or tests were run;repo_read.pywas unavailable as a command, so I used the prepared diff and reader tools.Results
Findings
Blocking
core/relinker/relinker/src/analysis/ExceptionTableParser.cpp:189: If an action record contains the valid SLEB128 valueINT64_MIN, evaluating-displacementoverflows signedint64_t, which is undefined behavior before the underflow check can reject the malformed chain. Handle the minimum value without signed negation (for example, calculate its magnitude in unsigned arithmetic).Non-blocking
None.
Sources
Not verified
No tests, build, or conventions checks were run. The full text of the changed test file, CMake file, and pipeline file was not read; only their diffs or relevant pipeline ranges were inspected. No changed files were excluded by the prepared manifest; all seven changed files were listed as included, but not all were read in full.
To get this to a good state
Handle
INT64_MINsafely in the action displacement underflow check, then rerun the unwind record bounds tests and review the changed files in full.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-22T04:51:14Z.
Review: APPROVED
Reviewed — looks good
Nothing blocks this change; the inspected code and test additions support the stated fixes.
What I ran
Reviewed head
84b837c03d2c27fe9c2993ae05bf2b6ad136d5c0usingrepo_read.pyto inspect the prepared diff and relevant source context. No commands or tests were run.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
No tests or convention checks were run; the PR description reports that
strict_nid_filter_testsvia CTest and the conventions check passed. Inspected files:CallSiteResolver.cpp,RelinkerPipeline.cpp, andStrictNidFilterTests.cpp. The manifest lists all three as included, and all three full texts were read. No excluded files were listed in the manifest;files.jsonwas not available through the reader.To get this to a good state
Nothing is required.