Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
gh-139653: Remove assertions in _Py_InitializeRecursionLimits()#141551
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
These checks were invalid and failed randomly on FreeBSD.
vstinner commentedNov 14, 2025
It also fails on Alpine Linux. |
a415a18 intopython:mainUh oh!
There was an error while loading.Please reload this page.
markshannon commentedNov 14, 2025
If an assertion is failing, fix whatever is causing the invariant to be broken. Don't just remove the assert. Please revert this change, and make an issue for the failures. Especially if it is "failing randomly". It is a necessary invariant that the stack pointer lie between the top of the stack and the soft limit. If that is not the case, we need to fix it. |
vstinner commentedNov 14, 2025
This PR is to repair FreeBSD and Alpine buildbots. These buildbot workers were crashing randomly (with an assertion error in fact). I suppose that WASI had the same issue but it was more likely on WASI so I already skipped the assertion on WASI.
It's the following assertion which fails randomly: uintptr_there_addr=_Py_get_machine_stack_pointer(); ....assert(here_addr<ts->c_stack_top); The code to get the stack top in uintptr_ttop_addr=_Py_SIZE_ROUND_UP(here_addr,4096); Maybe one problem is that the assertion is not checked in the same function than I don't have time to investigate this issue right now. I suppose that you should be able to reproduce it if you disable the |
markshannon commentedNov 17, 2025
It doesn't repair anything. It just leaves a latent bug to blow up later.
Then fix that, or make an issue for me to fix.Please don't turn off asserts without any review.
Sure, let's move the assert to make the point of failure clearer.
I'll try that. |
markshannon commentedNov 17, 2025
Oh, and please readhttps://github.com/python/cpython/blob/main/InternalDocs/stack_protection.md |
…pythonGH-141551)These checks were invalid and failed randomly on FreeBSDand Alpine Linux.
…python#141551)These checks were invalid and failed randomly on FreeBSDand Alpine Linux.
Uh oh!
There was an error while loading.Please reload this page.
These checks were invalid and failed randomly on FreeBSD.