Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix a stack overflow on Clang JIT build configurations with full LTO.
8 changes: 5 additions & 3 deletions Python/optimizer.c
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,8 @@ is_terminator(const _PyUOpInstruction *uop)

/* Returns 1 on success (added to trace), 0 on trace end.
*/
int
// gh-142543: inlining this function causes stack overflows
Py_NO_INLINE int
_PyJit_translate_single_bytecode_to_trace(
PyThreadState *tstate,
_PyInterpreterFrame *frame,
Expand Down Expand Up @@ -994,7 +995,8 @@ _PyJit_translate_single_bytecode_to_trace(
}

// Returns 0 for do not enter tracing, 1 on enter tracing.
int
// gh-142543: inlining this function causes stack overflows
Py_NO_INLINE int
_PyJit_TryInitializeTracing(
PyThreadState *tstate, _PyInterpreterFrame *frame, _Py_CODEUNIT *curr_instr,
_Py_CODEUNIT *start_instr, _Py_CODEUNIT *close_loop_instr, int curr_stackdepth, int chain_depth,
Expand Down Expand Up @@ -1066,7 +1068,7 @@ _PyJit_TryInitializeTracing(
return 1;
}

void
Py_NO_INLINE void
_PyJit_FinalizeTracing(PyThreadState *tstate)
{
_PyThreadStateImpl *_tstate = (_PyThreadStateImpl *)tstate;
Expand Down
Loading