Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 35.2k
gh-123923: Defer refcounting for f_executable in _PyInterpreterFrame#123924
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.
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
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| The ``f_executable`` field in the internal :c:struct:`_PyInterpreterFrame` | ||
| struct now uses a tagged pointer. Profilers and debuggers that uses this | ||
| field should clear the least significant bit to recover the | ||
| :c:expr:`PyObject*` pointer. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1625,8 +1625,6 @@ frame_dealloc(PyFrameObject *f) | ||
| } | ||
| Py_TRASHCAN_BEGIN(f, frame_dealloc); | ||
| PyObject *co = NULL; | ||
| /* GH-106092: If f->f_frame was on the stack and we reached the maximum | ||
| * nesting depth for deallocations, the trashcan may have delayed this | ||
| * deallocation until after f->f_frame is freed. Avoid dereferencing | ||
| @@ -1635,9 +1633,7 @@ frame_dealloc(PyFrameObject *f) | ||
| /* Kill all local variables including specials, if we own them */ | ||
| if (f->f_frame == frame && frame->owner == FRAME_OWNED_BY_FRAME_OBJECT) { | ||
| /* Don't clear code object until the end */ | ||
Fidget-Spinner marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| co = frame->f_executable; | ||
| frame->f_executable = NULL; | ||
| PyStackRef_CLEAR(frame->f_executable); | ||
| Py_CLEAR(frame->f_funcobj); | ||
| Py_CLEAR(frame->f_locals); | ||
| _PyStackRef *locals = _PyFrame_GetLocalsArray(frame); | ||
| @@ -1652,7 +1648,6 @@ frame_dealloc(PyFrameObject *f) | ||
| Py_CLEAR(f->f_extra_locals); | ||
| Py_CLEAR(f->f_locals_cache); | ||
| PyObject_GC_Del(f); | ||
| Py_XDECREF(co); | ||
| Py_TRASHCAN_END; | ||
| } | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.