test(relinker): audit eh_frame FDE displacement arithmetic and address bounds #17473
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/17473"
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-08T20:00:14Z.
What
Adds standalone guest unit tests in
core/relinker/relinker/tests/GuestRelinkerEhFrameFde.cppauditing DWARF.eh_frameFDE record initial_location displacement arithmetic and address range overflow limits.Tested
Verified locally with
guest_relinker_ehframe_fdetest suite andtools/check_conventions.py.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 gabichuuuuu on 2026-11-08T21:47:32Z.
Review: COMMENTED
Windows check of head
0b92ecb6ffagainstmain095ff72367. Setup: Windows 11, WinLibs GCC 15.2 r7 (x86_64-ucrt-posix-seh, the CI toolchain), Release,BUILD_TESTING=ON.CMake configuration fails.
core/relinker/CMakeLists.txtregistersrelinker/tests/GuestRelinkerEhFrameAug.cpp, which isn't in this branch (it's #17451's test), so configuring givesCannot find source fileandNo SOURCES given to target: guest_relinker_ehframe_aug_tests.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-21T04:57:19Z.
Review: COMMENTED
Reviewed — comments
The new test target is registered outside the
BUILD_TESTINGguard, which can break configurations that disable testing.What I ran
Reviewed head
fb99e55188a2db6592fea4368e6eaa7f8f7e80ccusingrepo_read.py. I did not run build or test commands. The author reports runningguest_relinker_ehframe_fdeandtools/check_conventions.py; those results were not independently verified.Results
Findings
Blocking
None.
Non-blocking
core/relinker/CMakeLists.txt:1334adds both test executables after theif(BUILD_TESTING)block closes at line 1332. This registers test targets even whenBUILD_TESTINGis off, despite the surrounding test setup being conditional. Move these additions inside the guard (or add a newif(BUILD_TESTING)around them).Not verified
No build, test, or convention check was run. The changed files
core/relinker/CMakeLists.txtandcore/relinker/relinker/tests/GuestRelinkerEhFrameFde.cppwere read. The supplied review manifest marks both changed files as included; no excluded changed files were listed. The separate excluded-files listing was unavailable through the reader.To get this to a good state
Nothing is required. Optional: place the new test registrations under
BUILD_TESTING.Pull request closed