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
The code is very simple:
import sys
sys.setrecursionlimit(1<<20)
test=lambda test:test(test)
test(test)
It basically works by changing the recursion limit and then starting an infinite recursion, this quickly gives a segfault.
This can be used to crash python.
Sorry, the documentation for sys.setrecursionlimit() explicitly warns you against doing this:
"The highest possible limit is platform-dependent. A user may need to set the limit higher when she has a program that requires deep recursion and a platform that supports a higher limit. This should be done with care, because a too-high limit can lead to a crash."
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: