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
I found a nice yield-based implementation of the sieve of Eratosthenes.
I tried to find the last prime number less than 1.000.000 (1M) - so I
had to increase the recursion limit (via sys.setrecursionlimit).
It seemed to work - but after running for about 3 minutes, the
Python interpreter (2.6.4) crashed with a segmentation fault.
I am attaching the code - it uses no libraries except for "sys"
(it needs it to set the recursionlimit).
The recursion limit exists precisely so that Python can avoid overflowing
the C stack and hence crashing. So if you increase the recursion limit
without also increasing the stack space assigned to the process, you
should expect 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: