GH-128682: Account for escapes in DECREF_INPUTS (GH-129953)
* Handle escapes in DECREF_INPUTS * Mark a few more functions as escaping * Replace DECREF_INPUTS with PyStackRef_CLOSE where possible
This commit is contained in:
@@ -118,7 +118,9 @@
|
||||
#ifdef Py_DEBUG
|
||||
#define LLTRACE_RESUME_FRAME() \
|
||||
do { \
|
||||
_PyFrame_SetStackPointer(frame, stack_pointer); \
|
||||
int lltrace = maybe_lltrace_resume_frame(frame, GLOBALS()); \
|
||||
stack_pointer = _PyFrame_GetStackPointer(frame); \
|
||||
if (lltrace < 0) { \
|
||||
JUMP_TO_LABEL(exit_unwind); \
|
||||
} \
|
||||
@@ -409,17 +411,21 @@ do { \
|
||||
} while (0)
|
||||
#endif
|
||||
|
||||
#define GOTO_TIER_ONE(TARGET) \
|
||||
do { \
|
||||
next_instr = (TARGET); \
|
||||
OPT_HIST(trace_uop_execution_counter, trace_run_length_hist); \
|
||||
Py_CLEAR(tstate->previous_executor); \
|
||||
if (next_instr == NULL) { \
|
||||
next_instr = frame->instr_ptr; \
|
||||
goto error; \
|
||||
} \
|
||||
DISPATCH(); \
|
||||
} while (0)
|
||||
#define GOTO_TIER_ONE(TARGET) \
|
||||
do \
|
||||
{ \
|
||||
next_instr = (TARGET); \
|
||||
OPT_HIST(trace_uop_execution_counter, trace_run_length_hist); \
|
||||
_PyFrame_SetStackPointer(frame, stack_pointer); \
|
||||
Py_CLEAR(tstate->previous_executor); \
|
||||
stack_pointer = _PyFrame_GetStackPointer(frame); \
|
||||
if (next_instr == NULL) \
|
||||
{ \
|
||||
next_instr = frame->instr_ptr; \
|
||||
goto error; \
|
||||
} \
|
||||
DISPATCH(); \
|
||||
} while (0)
|
||||
|
||||
#define CURRENT_OPARG() (next_uop[-1].oparg)
|
||||
#define CURRENT_OPERAND0() (next_uop[-1].operand0)
|
||||
|
||||
Reference in New Issue
Block a user