Skip to content

Commit bae4558

Browse files
authored
[SOT][3.11,3.12.3.14] cpython_internals use PyThreadState_GET error (#78708)
1 parent 5651a4b commit bae4558

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

paddle/fluid/pybind/sot/cpython_internals/internals_3_11.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ void Internal_PyFrame_Clear(_PyInterpreterFrame *frame) {
7979
_PyFrame_GetGenerator(frame)->gi_frame_state == FRAME_CLEARED);
8080
// GH-99729: Clearing this frame can expose the stack (via finalizers). It's
8181
// crucial that this frame has been unlinked, and is no longer visible:
82-
assert(_PyThreadState_GET()->cframe->current_frame != frame);
82+
assert(PyThreadState_GET()->cframe->current_frame != frame);
8383
if (frame->frame_obj) {
8484
PyFrameObject *f = frame->frame_obj;
8585
frame->frame_obj = NULL;

paddle/fluid/pybind/sot/cpython_internals/internals_3_12.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ void Internal_PyFrame_ClearExceptCode(_PyInterpreterFrame *frame) {
8989
_PyFrame_GetGenerator(frame)->gi_frame_state == FRAME_CLEARED);
9090
// GH-99729: Clearing this frame can expose the stack (via finalizers). It's
9191
// crucial that this frame has been unlinked, and is no longer visible:
92-
assert(_PyThreadState_GET()->cframe->current_frame != frame);
92+
assert(PyThreadState_GET()->cframe->current_frame != frame);
9393
if (frame->frame_obj) {
9494
PyFrameObject *f = frame->frame_obj;
9595
frame->frame_obj = NULL;

paddle/fluid/pybind/sot/cpython_internals/internals_3_14.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ void Internal_PyFrame_ClearExceptCode(_PyInterpreterFrame *frame) {
166166
_PyGen_GetGeneratorFromFrame(frame)->gi_frame_state == FRAME_CLEARED);
167167
// GH-99729: Clearing this frame can expose the stack (via finalizers). It's
168168
// crucial that this frame has been unlinked, and is no longer visible:
169-
assert(_PyThreadState_GET()->current_frame != frame);
169+
assert(PyThreadState_GET()->current_frame != frame);
170170
if (frame->frame_obj) {
171171
PyFrameObject *f = frame->frame_obj;
172172
frame->frame_obj = NULL;

0 commit comments

Comments
 (0)