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 — GH-127705: Handle trace refs in specialized decref by markshannon · Pull Request #131198 · python/cpython

Conversation

@markshannon

@markshannon markshannon commented Mar 13, 2025 •
edited by bedevere-app Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Adds a couple of _Py_ForgetReferences that were overlooked.

  • Issue: Use tagged pointers on the stack in the default build. #127705

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@markshannon
Handle trace refs in specialized decref
b5eb234
@bedevere-app bedevere-app Bot added the awaiting core review label Mar 13, 2025
@bedevere-app bedevere-app Bot mentioned this pull request Mar 13, 2025
Use tagged pointers on the stack in the default build. #127705
Closed
@markshannon markshannon added the skip news label Mar 13, 2025
@markshannon

markshannon commented Mar 13, 2025

Copy link
Copy Markdown
Member Author

!buildbot TraceRef

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot

bedevere-bot commented Mar 13, 2025

Copy link
Copy Markdown

🤖 New build scheduled with the buildbot fleet by @markshannon for commit b5eb234 🤖

Results will be shown at:

https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F131198%2Fmerge

The command will test the builders whose names match following regular expression: TraceRef

The builders matched are:

  • AMD64 Arch Linux TraceRefs PR
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

colesbury
colesbury reviewed Mar 13, 2025
View reviewed changes

@colesbury colesbury left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we should be exposing Py_DECREF_MORTAL and Py_DECREF_MORTAL_SPECIALIZED to extensions when they include Python.h. It seems to me like they belong in pycore_object.h or some other internal-only header.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

markshannon reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
Comment thread Include/refcount.h
#ifdef Py_TRACE_REFS
_Py_ForgetReference(op);
#endif
destruct(op);

@colesbury colesbury Mar 13, 2025

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is missing a _PyReftracerTrack(op, PyRefTracer_DESTROY);

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@hugovk hugovk Dec 9, 2025

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bretthowell714-source reported to GH for spam

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@markshannon markshannon mentioned this pull request Mar 14, 2025
Our internal headers are far too interlinked #131238
Closed
@markshannon

markshannon commented Mar 14, 2025

Copy link
Copy Markdown
Member Author

I don't think we should be exposing Py_DECREF_MORTAL and Py_DECREF_MORTAL_SPECIALIZED to extensions when they include Python.h. It seems to me like they belong in pycore_object.h or some other internal-only header.

I agree, but it is infeasible now due to cyclic includes.
I'll do that and add the _PyReftracerTrack(op, PyRefTracer_DESTROY); once I've sorted out #131238

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@encukou

encukou commented Mar 14, 2025

Copy link
Copy Markdown
Member

Merging as is, so we don't release with sys.getobjects segfaulting.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@encukou
encukou merged commit 67af96c into python:main Mar 14, 2025
@bedevere-app bedevere-app Bot removed the awaiting core review label Mar 14, 2025
@vstinner

vstinner commented Mar 14, 2025

Copy link
Copy Markdown
Member

Can you please rename Py_DECREF_MORTAL_SPECIALIZED() to _Py_DECREF_MORTAL_SPECIALIZED() in the public C API?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

plashchynski pushed a commit to plashchynski/cpython that referenced this pull request Mar 17, 2025
@markshannon @plashchynski
pythonGH-127705: Handle trace refs in specialized decref (pythonGH-13…
7d25f00
…1198)

This is missing `_PyReftracerTrack` calls, see pythongh-131238.
Merging as-is for the 3.14.0a6 release.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@colesbury colesbury colesbury left review comments
@hugovk hugovk hugovk left review comments
+1 more reviewer
@bretthowell714-source bretthowell714-source bretthowell714-source left review comments
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

skip news

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

7 participants

@markshannon @bedevere-bot @encukou @vstinner @colesbury @hugovk @bretthowell714-source
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402520 — 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.