Repository navigation
fix(relinker): honor EIP-relative addresses in the control-flow graph - #10343
Conversation
|
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed head 2cd0e5e against current main. The four address-size-sensitive CFG paths are consistently truncated to 32 bits before relocation lookup or enqueue/address-root handling, then naturally zero-extended by the VirtualAddress conversion. This matches Intel's 64-bit-mode 32-bit effective-address rule. The regression fixture covers relocated 0x67 indirect CALL/JMP targets plus both LEA-derived root paths, and checks the resulting roots. The required relinker matrix passed on Ubuntu, Windows, macOS ARM64 and macOS x86_64; ASAN also passed. I did not run the local relinker suite in this session. The platform product jobs were skipped by repository policy.
What
The control-flow graph calculated EIP-relative memory operands as full 64-bit addresses. It could miss relocated call and jump targets or root a high-address function that a 32-bit LEA does not reference. Apply the decoded address size before looking up pointers or following LEA targets.
Tested
Linux x86-64: each of the four new paths fails independently on unchanged main; the complete relinker build and suite pass after rebasing with the fix. Existing 64-bit transfers and roots remain covered. Windows/macOS execution not tested.
Rebased onto main
a19e7f6fdc54; the historical native instruction/regression evidence above is retained. No performance tests were rerun. #8076 changes disjoint embedded-data table tests.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)