GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — [3.14] gh-148284: Block inlining of gigantic functions in ceval.c for clang 22 by Fidget-Spinner · Pull Request #148326 · python/cpython Conversation
|
If possible, I would prefer to fix the main branch first, and then backport to 3.14. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
OK, I need to test on |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| else | ||
| CFLAGS_CEVAL="" | ||
| fi | ||
| AC_SUBST([CFLAGS_CEVAL]) |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Can you document this new variable in https://docs.python.org/dev/using/configure.html#envvar-CFLAGS_ALIASING ?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Is there a way to make this a private variable? I don't feel good exposing it for now.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| // See gh-148284: | ||
| // Clang 22 seems to have interactions with inlining and the stackref buffer | ||
| // which cause 40kB of stack usage on x86-64 in buggy versions of _PyEval_EvalFrameDefault | ||
| // in computed goto interpreter. The normal usage seen is normally 1-2kB. |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Reformat to 80 columns and minor cleanup:
| // See gh-148284: | |
| // Clang 22 seems to have interactions with inlining and the stackref buffer | |
| // which cause 40kB of stack usage on x86-64 in buggy versions of _PyEval_EvalFrameDefault | |
| // in computed goto interpreter. The normal usage seen is normally 1-2kB. | |
| // See gh-148284: Clang 22 seems to have interactions with inlining | |
| // and the stackref buffer which cause 40 kB of stack usage on x86-64 | |
| // in buggy versions of _PyEval_EvalFrameDefault() in computed goto | |
| // interpreter. The normal usage seen is normally 1-2 kB. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| // This number should be tuned to follow the C stack consumption | ||
| // in _PyEval_EvalFrameDefault on computed goto interpreter. |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I suggest adding "Suppress inlining of functions whose stack size exceeds 512 bytes." to explain the purpose of this option:
| // This number should be tuned to follow the C stack consumption | |
| // in _PyEval_EvalFrameDefault on computed goto interpreter. | |
| // gh-148284: Suppress inlining of functions whose stack size exceeds | |
| // 512 bytes. This number should be tuned to follow the C stack | |
| // consumption in _PyEval_EvalFrameDefault() on computed goto | |
| // interpreter. |
The Clang option is documented at: https://clang.llvm.org/docs/ClangCommandLineReference.html#cmdoption-clang-finline-max-stacksize
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
In the past, when I tried to reduce the stack memory consumption on Python function calls, I used In |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.