Repository navigation
fix(tools): cross-check ELF audit metadata - #19817
Merged
oneandonlydean merged 1 commit intoNov 14, 2026
Merged
oneandonlydean merged 1 commit into
oneandonlydean merged 1 commit into
Conversation
Contributor
|
Windows check of head
AI-assisted: yes. |
|
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.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Refuse contradictory section-derived and runtime ELF import, export and dependency inventories. Currently changing only a section-table symbol pointer can hide unchanged PT_DYNAMIC imports and publish a false clean audit.
When both views exist, read runtime symbols through the program headers/dynamic addresses and compare inventories, including weak-import bindings. Keep section-only inputs, matching hashless sectioned inputs and dependency-only dynamic inputs supported. Sectionless hash requirements are unchanged. Without a runtime hash, the cross-check still uses the validated section symbol count; it does not establish an unknown runtime symbol-table tail.
Tested
Windows 11, Python 3.12, Release relinker-only; base
6fd2999417948562be633aa71629bab45d0e8b81, head47e0804139ab117fb3c7fa394664b01fa798354b, tree50496463ec3ea8260f046b28378dca629582572c.test_import_audit.pyproduces 9 assertion failures, zero errors. Each new refusal prevents a previously accepted false/inconsistent report.python -B tools/tests/test_import_audit.py -v: 200 tests, 198 pass and two expected POSIX permission/umask skips. Matching and conflicting SysV/GNU-hash views; changed symbol/string/weak/dependency sections; section-only inputs; matching hashless and dependency-only sectioned ELF; real CLI refusal without replacing its previous JSON report. USAGE now describes the inventory-agreement rule.ctest --test-dir build --no-tests=error --output-on-failure -R '^import_audit$': 1/1 passes, with the same two disclosed child-suite skips.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)