GH-137573: mark _PyOptimizer_Optimize as no inline (GH-137731)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
This commit is contained in:
Sachin Shah
2025-08-14 03:00:00 -05:00
committed by GitHub
parent 7a703c8f19
commit c9d7065188
2 changed files with 4 additions and 1 deletions

View File

@@ -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)