File tree Expand file tree Collapse file tree 3 files changed +24
-18
lines changed
Expand file tree Collapse file tree 3 files changed +24
-18
lines changed Original file line number Diff line number Diff line change @@ -1574,6 +1574,12 @@ Compiler flags
15741574
15751575 .. versionadded :: 3.7
15761576
1577+ .. envvar :: CFLAGS_CEVAL
1578+
1579+ Flags used to compile ``Python/ceval.c ``.
1580+
1581+ .. versionadded :: 3.14.5
1582+
15771583.. envvar :: CCSHARED
15781584
15791585 Compiler flags used to build a shared library.
Original file line number Diff line number Diff line change @@ -7374,10 +7374,10 @@ fi
73747374AC_MSG_CHECKING ( [ if we need to manually block large inlining in ceval.c] )
73757375AC_RUN_IFELSE ( [ AC_LANG_SOURCE ( [ [
73767376int main(void) {
7377- // See gh-148284:
7378- // Clang 22 seems to have interactions with inlining and the stackref buffer
7379- // which cause 40kB of stack usage on x86-64 in buggy versions of _PyEval_EvalFrameDefault
7380- // in computed goto interpreter. The normal usage seen is normally 1-2kB .
7377+ // See gh-148284: Clang 22 seems to have interactions with inlining
7378+ // and the stackref buffer which cause 40 kB of stack usage on x86-64
7379+ // in buggy versions of _PyEval_EvalFrameDefault() in computed goto
7380+ // interpreter. The normal usage seen is normally 1-2 kB .
73817381#if defined(__clang__) && (__clang_major__ == 22)
73827382 return 1;
73837383#else
@@ -7391,11 +7391,11 @@ int main(void) {
73917391AC_MSG_RESULT ( [ $block_huge_inlining_in_ceval] )
73927392
73937393if test "$block_huge_inlining_in_ceval" = yes && test "$ac_cv_computed_gotos" = yes; then
7394- // This number should be tuned to follow the C stack consumption
7395- // in _PyEval_EvalFrameDefault on computed goto interpreter.
7396- CFLAGS_CEVAL="-finline-max-stacksize=512"
7397- else
7398- CFLAGS_CEVAL=""
7394+ # gh-148284: Suppress inlining of functions whose stack size exceeds
7395+ # 512 bytes. This number should be tuned to follow the C stack
7396+ # consumption in _PyEval_EvalFrameDefault() on computed goto
7397+ # interpreter.
7398+ CFLAGS_CEVAL="$CFLAGS_CEVAL -finline-max-stacksize=512 "
73997399fi
74007400AC_SUBST ( [ CFLAGS_CEVAL] )
74017401
You can’t perform that action at this time.
0 commit comments