Skip to content

Build fails with Py_STACKREF_DEBUG set. #135125

Closed

Description

@markshannon

Bug report

Bug description:

I think this is a relatively recent regression, probably in the last month or so.

Can be reproduced by uncommenting the line:

// #define Py_STACKREF_DEBUG 1

in pycore_structs.h

CPython versions tested on:

CPython main branch

Operating systems tested on:

Linux

Linked PRs

Activity

  1. added
    type-bug
    on Jun 4, 2025
  2. markshannon commented on Jun 6, 2025

    @markshannon
    MemberAuthor

    Bisected to 6dcb0fd

  3. added
    interpreter-core
    build
    on Jun 7, 2025
  4. efimov-mikhail commented on Oct 1, 2025

    @efimov-mikhail
    Member

    Bisected to 6dcb0fd

    Yes, problem was introduced here, _PyStackRef_FromPyObjectBorrow is incorrect on mortal objects in PyStackRef debug mode.

  5. added a commit that references this issue on Oct 23, 2025
  6. added a commit that references this issue on Dec 6, 2025
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

    buildinterpreter-coretype-bug

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions