Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python 2.6.4 segfaults #51863

Closed
ttsiod mannequin opened this issue Dec 31, 2009 · 2 comments
Closed

Python 2.6.4 segfaults #51863

ttsiod mannequin opened this issue Dec 31, 2009 · 2 comments
Labels
type-crash A hard crash of the interpreter, possibly with a core dump

Comments

@ttsiod
Copy link
Mannequin

ttsiod mannequin commented Dec 31, 2009

BPO 7614
Nosy @mdickinson
Files
  • sieve.py: Sieve of Eratosthenes
  • 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:

    assignee = None
    closed_at = <Date 2009-12-31.21:58:44.242>
    created_at = <Date 2009-12-31.21:33:13.038>
    labels = ['type-crash']
    title = 'Python 2.6.4 segfaults'
    updated_at = <Date 2009-12-31.21:58:44.216>
    user = 'https://bugs.python.org/ttsiod'

    bugs.python.org fields:

    activity = <Date 2009-12-31.21:58:44.216>
    actor = 'mark.dickinson'
    assignee = 'none'
    closed = True
    closed_date = <Date 2009-12-31.21:58:44.242>
    closer = 'mark.dickinson'
    components = ['None']
    creation = <Date 2009-12-31.21:33:13.038>
    creator = 'ttsiod'
    dependencies = []
    files = ['15714']
    hgrepos = []
    issue_num = 7614
    keywords = []
    message_count = 2.0
    messages = ['97109', '97110']
    nosy_count = 2.0
    nosy_names = ['mark.dickinson', 'ttsiod']
    pr_nums = []
    priority = 'normal'
    resolution = 'wont fix'
    stage = None
    status = 'closed'
    superseder = None
    type = 'crash'
    url = 'https://bugs.python.org/issue7614'
    versions = ['Python 2.6']

    @ttsiod
    Copy link
    Mannequin Author

    ttsiod mannequin commented Dec 31, 2009

    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).

    @ttsiod ttsiod mannequin added the type-crash A hard crash of the interpreter, possibly with a core dump label Dec 31, 2009
    @mdickinson
    Copy link
    Member

    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.

    Closing as won't fix.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    type-crash A hard crash of the interpreter, possibly with a core dump
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant