You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test_c_stack_unwind fails on AArch64 with pointer authentication enabled #160102
Building CPython 3.15.0 on openSUSE for AArch64 fails in test_c_stack_unwind.ManualStackUnwindTests.test_manual_unwind_finds_expected_frames. Intel builds pass.
The test fails with both PYTHON_JIT=0 and PYTHON_JIT=1:
AssertionError: 1 not greater than or equal to 10 : expected to find Python frames on aarch64 with env {'PYTHON_JIT': '0'}
AssertionError: 0 not greater than 0 : expected to find JIT frames on aarch64 with env {'PYTHON_JIT': '1'}
The build uses these compiler flags, among others:
The unwinder appears to read saved return addresses without stripping AArch64 pointer-authentication bits. These signed addresses then fail classification against Python and JIT code ranges.
For example, the test reports:
JIT ranges:
0xffff8303d000-0xffff8303f000
but classifies return addresses such as:
#05 0x71ffff8303d9f0 -> other
#10 0x27ffff8303d9f0 -> other
#15 0x64ffff8303d9f0 -> other
Without the authentication bits, each is 0xffff8303d9f0, which lies inside the reported JIT range.
It then converts that raw value to a Python integer without removing pointer-authentication bits.
It looks like the manual unwinder needs to strip these bits before returning addresses for classification. Frame pointers are already enabled in this build.
This is related to #126910, but appears distinct from #151602, where frame-pointer omission causes the same test to fail.
Related to #152240, which fixes architecture-specific failures in the same test on LoongArch. This AArch64 failure appears different: the frame chain is traversed successfully, but saved return addresses retain pointer-authentication bits and therefore fail code-range classification.
Activity
Update python315 to version 3.15.0 / rev 22 via SR 1387083