GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — test_c_stack_unwind fails on AArch64 with pointer authentication enabled · Issue #160102 · python/cpython

test_c_stack_unwind fails on AArch64 with pointer authentication enabled #160102

New issue
Copy link
New issue
Copy link
Open
Open
test_c_stack_unwind fails on AArch64 with pointer authentication enabled#160102
Copy link
Labels
testsTests in the Lib/test dirTests in the Lib/test dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

@mcepl
mcepl
opened on Oct 21, 2026
Issue body actions

Bug report

Bug description

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:

-mbranch-protection=standard
-fno-omit-frame-pointer
-mno-omit-leaf-frame-pointer
-O2
-flto

Relevant configure options:

--enable-shared
--with-lto
--enable-experimental-jit=yes-off

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.

The corresponding summary is:

{"length": 62, "python_frames": 10, "jit_frames": 0, "other_frames": 52, "jit_backend": "jit", "unwinder": "manual_frame_pointer_unwind"}

In Modules/_testinternalcapi.c, manual_unwind_from_fp() reads the saved address directly:

uintptr_t return_addr = frame_pointer[FRAME_POINTER_RETURN_OFFSET];

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.

Package sources: https://src.opensuse.org/python-interpreters/python315

CPython versions tested on:

3.15.0 and 3.16.0~a1

Operating systems tested on:

Linux

Activity

  1. mcepl
    added
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    on Oct 21, 2026
  2. NekoAsakura
    added
    testsTests in the Lib/test dirTests in the Lib/test dir
    on Oct 21, 2026
  3. bmwiedemann
    added a commit that references this issue on Oct 22, 2026

    Update python315 to version 3.15.0 / rev 22 via SR 1387083

    7d37689
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    testsTests in the Lib/test dirTests in the Lib/test dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.