8000 GH-119866: Don't clear `frame->stackpointer` on release builds by brandtbucher · Pull Request #131750 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

GH-119866: Don't clear frame->stackpointer on release builds #131750

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

Merged
merged 2 commits into from
Mar 26, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Update comment
  • Loading branch information
brandtbucher committed Mar 26, 2025
commit a0c76fd0219223d775f61796da17e67049bf4f97
6 changes: 3 additions & 3 deletions Include/internal/pycore_interpframe.h
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,9 @@ _PyFrame_GetLocalsArray(_PyInterpreterFrame *frame)
return frame->localsplus;
}

/* Fetches the stack pointer, and sets stackpointer to NULL.
Having stackpointer == NULL ensures that invalid
values are not visible to the cycle GC. */
// Fetches the stack pointer, and (on debug builds) sets stackpointer to NULL.
// Having stackpointer == NULL makes it easier to catch missing stack pointer
// spills/restores (which could expose invalid values to the GC) using asserts.
static inline _PyStackRef*
_PyFrame_GetStackPointer(_PyInterpreterFrame *frame)
{
Expand Down
Loading
0