Skip to content

Commit

Permalink
[3.11] gh-101975: Fixed a potential SegFault on garbage collection (G…
Browse files Browse the repository at this point in the history
…H-102803) (GH-102807)

Authored-by: gaogaotiantian <gaogaotiantian@hotmail.com>
  • Loading branch information
markshannon authored Mar 20, 2023
1 parent 9883356 commit d149f15
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed ``stacktop`` value on tracing entries to avoid corruption on garbage collection.
1 change: 1 addition & 0 deletions Python/ceval.c
Original file line number Diff line number Diff line change
Expand Up @@ -1536,6 +1536,7 @@ eval_frame_handle_pending(PyThreadState *tstate)
_PyFrame_SetStackPointer(frame, stack_pointer); \
int err = trace_function_entry(tstate, frame); \
stack_pointer = _PyFrame_GetStackPointer(frame); \
frame->stacktop = -1; \
if (err) { \
goto error; \
} \
Expand Down

0 comments on commit d149f15

Please sign in to comment.