fix(tools): check exports through local ABI aliases #12654
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/12654"
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 SnekPolylepis on 2026-10-29T00:28:34Z.
Overlap: Alias expansion is now limited to export checks. A local merge simulation with #9966 head
db01701dbsucceeds without conflicts; the two PRs address different behavior.Latest validation: Merged main
3a2b91981into head 95b34beae4. Windows: conventions, diff check, and 196 conventions tests pass (Python 3.13).Replaces #9568, which the open-PR limit bot closed. The branch is unchanged apart from merging current
main.Refresh: October 26 refresh: merged current upstream main at c8254c160. Windows conventions and git diff --check pass; 181 conventions tests pass (Python 3.13). The earlier test results below refer to the previous head.
What
Local calling-convention aliases such as
#define NATIVE_SYSV APS5_VABIcurrently hide exports from the conventions checker's duplicate-export and silent-stub checks. Expand local single-line object-like aliases only for export checks, including alias chains, redefinitions, undefinitions and cycles. The shared C++ masking helper retains its existing behavior.Add regression cases showing that aliased exports cannot bypass either check. This changes tooling only and adds no dependencies.
Tested
Head
3146d358b0: All 197 conventions tests, including the focused alias and declaration tests, pass on Windows (Python 3.13); conventions andgit diff --checkpass. A merge simulation with #9966 is clean.Windows, Python 3.13: all 151 conventions tests passed; final focused suite of 16 tests passed again before pushing.
Ubuntu 24.04 / WSL, Python 3.12: all 151 conventions tests passed from the committed snapshot in a native Linux Git checkout.
Conventions self-check and
git diff --checkpassed.Reproduced hidden duplicate exports on an existing local branch; the updated checker rejects them.
Earlier head:
tools/pr_overlap.py --branch fix/abi-alias-export-checkreported no overlap at the time. Related PR #8777 covers assembly exports; merge-tree check with its fetched head was clean.Scope: local single-line object-like aliases only; this does not implement a full C++ preprocessor.
Checklist
Based on current
main; no other open PR implements the same functionsOne topic per PR; follow-ups go in a new PR
No comments in code except technical debt
Unimplemented paths throw (
NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt fileNo notes, investigation
.mdfiles or images added to the repository (attach them to this PR)New third-party code is a submodule built from source
Generic behaviour, not specific to one title
Depends on: none
Fixes: none
Unblocks: none
GPUs tested: n/a
AI-assisted: yes
🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by THEMANnt on 2026-10-29T06:49:18Z.
Review: APPROVED
Reviewed
33b94bc073fca30cb236f72908615d51097ca200against3a2b91981651569163768854a1fcdc7193b6667b. Conventions scanning expands local object-like ABI alias chains at the relevant source line, respects undef/redefinition and cycles, and shares that expansion with duplicate-export scanning. Comment/string masking and line counts are preserved. No actionable finding in this scoped review.Windows/Python 3.11 validation: head 27 passed, 0 skipped; baseline 19 passed, 0 skipped. Both changed conventions suites pass. Old production fails the alias-export checks and also lacks the new helper API; missing-helper errors alone are not behavioral proof. No production export implementation was changed.