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 — GH-137573: Check C stack depth before stack allocating JIT optimizer struct by markshannon · Pull Request #137676 · python/cpython Conversation
|
|
Just so I'm clear: you plan to move this to the thread state later but only on main right? So that we don't change the struct layout in an rc for 3.14? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Co-authored-by: Adam Turner <[email protected]>
|
Can you please add a |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Yes, but not in this PR as it seems unrelated |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Yes, that's the plan. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| OPT_STAT_INC(optimizer_attempts); | ||
| /* Make sure we have enough C stack space for the optimizer */ | ||
| int margin = 1 + sizeof(JitOptContext)/_PyOS_STACK_MARGIN_BYTES; | ||
| if (_Py_ReachedRecursionLimitWithMargin(_PyThreadState_GET(), margin)) { |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
To work properly, the optimize_uops function or this function must be marked Py_NO_INLINE as well.
Otherwise, the compiler can just inline the functions and hoist the alloca above the check, making the check useless.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
We've already started moving the buffers to the heap, so this won't be needed. |
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.