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,2 @@
Mark ``_PyOptimizer_Optimize`` as :c:macro:`Py_NO_INLINE` to
prevent stack overflow crashes on macOS.
3 changes: 2 additions & 1 deletion Python/optimizer.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@ uop_optimize(_PyInterpreterFrame *frame, _Py_CODEUNIT *instr,
/* Returns 1 if optimized, 0 if not optimized, and -1 for an error.
* If optimized, *executor_ptr contains a new reference to the executor
*/
int
// gh-137573: inlining this function causes stack overflows
Py_NO_INLINE int
_PyOptimizer_Optimize(
_PyInterpreterFrame *frame, _Py_CODEUNIT *start,
_PyExecutorObject **executor_ptr, int chain_depth)
Expand Down
Loading