You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Victor, do you remember we measured the recursion limit for different kind of recursion, like via custom __getitem__, __getattr__, __call__, properties, partial(), etc, and you did an awesome work for reducing the stack consumption? Do you remember the issue number? I think that in many of such cases the recursion is still limited, and it would be nice to have tests for this, to avoid regression.
where there are more examples of stack overflowing code. I think that they could be included instead of the removed recursive_call.py.
We can also add separate test which runs maximally deep recursion (with the limit depending on platform) to ensure that there is no regression in new versions.
In this issue, I looked at crasher scripts and some of them no longer crash. They should be removed. I will try to come up with a change to remove them and maybe update the others based on the closed PR #108299.
Sadly, I failed track of this issue. While it may be nice to cleanup Lib/test/crashers/, it became a lower priority for me since I removed test_crashers, instead of running it. I close the issue. If someone is motivated to cleanup this directory, go ahead and propose a new issue and/or PR.
Activity
pythongh-108297: Update test_crashers
pythongh-108297: Update test_crashers
serhiy-storchaka commentedon Aug 22, 2023
Victor, do you remember we measured the recursion limit for different kind of recursion, like via custom
__getitem__,__getattr__,__call__, properties, partial(), etc, and you did an awesome work for reducing the stack consumption? Do you remember the issue number? I think that in many of such cases the recursion is still limited, and it would be nice to have tests for this, to avoid regression.vstinner commentedon Aug 22, 2023
It was in 2017, search for "Stack consumption" at https://vstinner.github.io/contrib-cpython-2017q1.html
I added
_testcapi.stack_pointer()in issue #75049: see script https://bugs.python.org/file46992/stack_overflow-3.pyOn the main branch with a debug build (pydebug with
gcc -O0), I get:On the main branch with a release build (
gcc -O3), I get:test_python_getitemmemory usage is quite good, it's almost free :-)I'm not sure where 109,060 number comes from.
pythongh-108297: Update test_crashers
serhiy-storchaka commentedon Aug 23, 2023
Thank you Victor. Other issues:
where there are more examples of stack overflowing code. I think that they could be included instead of the removed
recursive_call.py.We can also add separate test which runs maximally deep recursion (with the limit depending on platform) to ensure that there is no regression in new versions.
pythongh-108297: Remove test_crashers
pythongh-108297: Remove test_crashers
gh-108297: Remove test_crashers (#108690)
vstinner commentedon Aug 30, 2023
In this issue, I looked at crasher scripts and some of them no longer crash. They should be removed. I will try to come up with a change to remove them and maybe update the others based on the closed PR #108299.
vstinner commentedon Sep 13, 2023
Sadly, I failed track of this issue. While it may be nice to cleanup Lib/test/crashers/, it became a lower priority for me since I removed test_crashers, instead of running it. I close the issue. If someone is motivated to cleanup this directory, go ahead and propose a new issue and/or PR.
gh-108297: Update crashers README for test_crashers removal (#121475)
pythongh-108297: Update crashers README for test_crashers removal (py…
[3.13] gh-108297: Update crashers README for test_crashers removal (#…
pythongh-108297: Update crashers README for test_crashers removal (py…
pythongh-108297: Update crashers README for test_crashers removal (py…