Skip to content

stack exhaustion in 3.6.7 #79723

Closed
Closed

Description

@httpsgithubcomxcainiao
BPO 35542
Nosy @tirkarthi, @https://github.com/xcainiao

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 2018-12-20.07:25:10.658>
created_at = <Date 2018-12-20.06:53:17.229>
labels = ['invalid', 'expert-2to3', 'type-crash']
title = 'stack exhaustion in 3.6.7'
updated_at = <Date 2018-12-20.07:25:10.656>
user = 'https://github.com/httpsgithubcomxcainiao'

bugs.python.org fields:

activity = <Date 2018-12-20.07:25:10.656>
actor = 'shuoz'
assignee = 'none'
closed = True
closed_date = <Date 2018-12-20.07:25:10.658>
closer = 'shuoz'
components = ['2to3 (2.x to 3.x conversion tool)']
creation = <Date 2018-12-20.06:53:17.229>
creator = 'shuoz'
dependencies = []
files = []
hgrepos = []
issue_num = 35542
keywords = []
message_count = 3.0
messages = ['332183', '332184', '332188']
nosy_count = 2.0
nosy_names = ['xtreak', 'shuoz']
pr_nums = []
priority = 'normal'
resolution = 'not a bug'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'crash'
url = 'https://bugs.python.org/issue35542'
versions = ['Python 3.6']

Activity

  1. httpsgithubcomxcainiao commented on Dec 20, 2018

    httpsgithubcomxcainiaomannequin
    MannequinAuthor

    stack exhaustion in 3.6.7.

    in python 3.6.7 set recursive depth 20000 will exhaustion stack and get Segmentation fault. But this dont happen in python 2.7

    import sys
    sys.setrecursionlimit(20000)
    def f():
        f()
    f()
    
  2. tirkarthi commented on Dec 20, 2018

    @tirkarthi
    Member

    Related older issue : bpo-1110055

    https://docs.python.org/3/library/sys.html#sys.setrecursionlimit

    The highest possible limit is platform-dependent. A user may need to set the limit higher when they have 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.

    I think this is a known case where the stack limit is hit depending on the operating system before RecursionError can be raised when a higher recursion limit is set. On my machine (Mac 10.10.4) this segfaults on 2.7 but raises RecurstionError on Python 3.7.1. Increasing the limit to 200000 causes segfault on 3.7.1.

  3. httpsgithubcomxcainiao commented on Dec 20, 2018

    httpsgithubcomxcainiaomannequin
    MannequinAuthor

    thank you for your reply.

  4. added
    type-crashA hard crash of the interpreter, possibly with a core dump
    and removed on Dec 20, 2018
  5. transferred this issue fromon Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic-2to3type-crashA hard crash of the interpreter, possibly with a core dump

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions