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-137007: Track executor before any possible deallocations by Fidget-Spinner · Pull Request #137016 · python/cpython

gh-137007: Track executor before any possible deallocations #137016

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Sign up for GitHub

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Fidget-Spinner merged 8 commits into python:main from Fidget-Spinner:track-before-deallocating
Dec 10, 2025

Uh oh!

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

Merged

gh-137007: Track executor before any possible deallocations #137016

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
8 commits
Select commit Hold shift + click to select a range
31ad0d9
Track executor before any possible deallocations
Fidget-Spinner Jul 22, 2025
c16da4f
📜🤖 Added by blurb_it.
blurb-it[bot] Jul 22, 2025
4f9f6de
move further up
Fidget-Spinner Jul 22, 2025
d9225ee
Merge branch 'track-before-deallocating' of github.com:Fidget-Spinner…
Fidget-Spinner Jul 22, 2025
a4f3d54
Merge remote-tracking branch 'upstream/main' into track-before-deallo…
Fidget-Spinner Nov 7, 2025
4ae3405
track before immortalizing
Fidget-Spinner Nov 7, 2025
bc2da12
remove useless track
Fidget-Spinner Dec 9, 2025
5a4c18a
Merge branch 'main' into track-before-deallocating
Fidget-Spinner Dec 10, 2025
File filter
Filter by extension

Clear filters
Conversations
Failed to load comments.
Loading

Uh oh!

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

Jump to
Jump to file
Failed to load files.
Loading

Uh oh!

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

Diff view
Diff view

There are no files selected for viewing

1 change: 1 addition & 0 deletions 1 Misc/NEWS.d/next/Core_and_Builtins/2025-07-22-16-20-06.gh-issue-137007.1oPvvK.rst
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix a bug during JIT compilation failure which caused garbage collection debug assertions to fail.
5 changes: 4 additions & 1 deletion 5 Python/optimizer.c
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -1310,6 +1310,10 @@ make_executor_from_uops(_PyUOpInstruction *buffer, int length, const _PyBloomFil
assert(next_exit == -1);
assert(dest == executor->trace);
assert(dest->opcode == _START_EXECUTOR);
// Note: we MUST track it here before any Py_DECREF(executor) or
// linking of executor. Otherwise, the GC tries to untrack a
// still untracked object during dealloc.
_PyObject_GC_TRACK(executor);
_Py_ExecutorInit(executor, dependencies);
#ifdef Py_DEBUG
char *python_lltrace = Py_GETENV("PYTHON_LLTRACE");
Expand Down Expand Up @@ -1338,7 +1342,6 @@ make_executor_from_uops(_PyUOpInstruction *buffer, int length, const _PyBloomFil
return NULL;
Comment thread

@Fidget-Spinner Fidget-Spinner Jul 22, 2025

Copy link
Copy Markdown
Member Author

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.

Note to reviewers: the bad dealloc happens right above this line at line 1233/1238 depending on which diff you view.

Sorry, something went wrong.

Uh oh!

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

All reactions
}
#endif
_PyObject_GC_TRACK(executor);
return executor;
}

Expand Down
Loading
Oops, something went wrong.

Uh oh!

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

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 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.