GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — PyErr_GivenExceptionMatches crashes with SIGSEGV on deeply nested tuple targets · Issue #156204 · python/cpython Closed Closed Copy link Labels interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-crashA hard crash of the interpreter, possibly with a core dumpA hard crash of the interpreter, possibly with a core dump DescriptionCrash reportWhat happened?Problem Description
When evaluating deeply nested tuple structures passed through C API extensions or dynamic tuple composition, unbounded native C call stack growth leads to stack exhaustion and an immediate Steps to Reproduceimport ctypes lib = ctypes.pythonapi lib.PyErr_GivenExceptionMatches.argtypes = [ctypes.py_object, ctypes.py_object] lib.PyErr_GivenExceptionMatches.restype = ctypes.c_int # Construct deeply nested tuple target tup = (1, ValueError) for _ in range(1_000_000): tup = (1, tup) # Trigger exception matching traversal res = lib.PyErr_GivenExceptionMatches(TypeError(), tup) Actual Result
Expected Result
CPython versions tested on:CPython main branch Operating systems tested on:Linux Output from running 'python -VV' on the command line:Python 3.16.0a0 (heads/fix-err-given-exception-matches-recursion:999a046b24c, Aug 21 2026, 18:34:) [GCC 13.3.0] Linked PRsActivity
MetadataMetadataAssigneesLabelsinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-crashA hard crash of the interpreter, possibly with a core dumpA hard crash of the interpreter, possibly with a core dump ProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402520 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |