Repository navigation
fix(relinker): read LSDA call-site tables only under a personality routine - #1944
Conversation
|
Windows run of the three titles. Windows 11, RTX 3080, WinLibs GCC 15.2.0 r7, Release,
|
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed the full diff against current main. The change is narrowly scoped to avoid parsing an LSDA as a C++ call-site table when its CIE has no personality routine; the fixture now explicitly covers both the personality and no-personality cases. I built the relinker-only configuration on Linux and ran all 38 CTests successfully, including strict_nid_filter. Conventions and diff checks pass, and the author has supplied Windows evidence for the three reported NativeAOT cases. The upstream workflow is not yet reported for this head, so normal CI evidence remains outstanding.
547b458 to
7b5daf3
Compare
|
Windows run with a title for this PR. Prospero Vibrate PPSA99920 1.0 (catalog release, sha256 as in the record,
AI-assisted: yes (Claude Code). |
e91cb0d to
93d7113
Compare
93d7113 to
c970ca7
Compare
…thout-personality fix(relinker): read LSDA call-site tables only under a personality routine
What
EhFrameReaderreads an FDE's LSDA as an Itanium C++ call-site table only when its CIE names a personality routine (Pin the augmentation). An LSDA under a CIE without one is skipped.The C++ LSDA format is defined by the personality routine that reads it. With no personality the unwinder never consults the LSDA, so its contents need not be a C++ table. .NET NativeAOT writes exactly this: every CIE is
zLR, and each LSDA points at the runtime's own EH info, which its runtime reads instead of a C++ personality routine. Its catch and finally funclets are separate functions with their own FDEs, so no code is lost by not reading these LSDAs.Three catalog titles are C# NativeAOT builds (
System.Private.CoreLibin the executable) and fail to relink with--windowsonmain:FAIL: Strict filter: LSDA call-site table size mismatch (offset 0x1f5950)0x1ffd0b0x153c03In these three, every CIE is
zLR, and 4474, 4699 and 2731 of their LSDAs respectively do not parse as call-site tables. The 38 other catalog titles I could relink use onlyzPLRCIEs, and all of their roughly 65,000 LSDAs parse as call-site tables, so this change does not affect them.exceptionLandingPadsused azLRCIE to exercise call-site parsing. It now useszPLR, with the personality as an extra target. The newexceptionDataWithoutPersonalitychecks that an LSDA that is not a call-site table, under azLRCIE, is accepted and adds no targets.Tested
Linux (Ubuntu 24.04, GCC 13, Release,
ANYPS5_RELINKER_ONLY=ON): all 38 relinker tests pass.strict_nid_filterfails when the personality check is removed. The three titles above now relink with--windows(exit 0); Linux output was already unaffected.check_conventions.pypasses. Windows: not run with this branch; the failure and its absence are both in the relinker, which I ran on Linux with--windows.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)