This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients JelleZijlstra, Rohit Mediratta, berker.peksag, cstratak, iritkatriel, serhiy.storchaka, vstinner
Date 2021-09-07.16:45:07
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1631033107.3.0.520979357483.issue27277@roundup.psfhosted.org>
In-reply-to
Content
I just pushed a change to reduce the stack memory usage when deleting a chain of exceptions in bpo-44348. I consider that this issue is a duplicate. If it's not the case, please reopen the issue.

commit fb305092a5d7894b41f122c1a1117b3abf4c567e (upstream/main, main)
Author: Victor Stinner <vstinner@python.org>
Date:   Tue Sep 7 15:42:11 2021 +0200

    bpo-44348: BaseException deallocator uses trashcan (GH-28190)
    
    The deallocator function of the BaseException type now uses the
    trashcan mecanism to prevent stack overflow. For example, when a
    RecursionError instance is raised, it can be linked to another
    RecursionError through the __context__ attribute or the __traceback__
    attribute, and then a chain of exceptions is created. When the chain
    is destroyed, nested deallocator function calls can crash with a
    stack overflow if the chain is too long compared to the available
    stack memory.
History
Date User Action Args
2021-09-07 16:45:07vstinnersetrecipients: + vstinner, berker.peksag, serhiy.storchaka, JelleZijlstra, Rohit Mediratta, cstratak, iritkatriel
2021-09-07 16:45:07vstinnersetmessageid: <1631033107.3.0.520979357483.issue27277@roundup.psfhosted.org>
2021-09-07 16:45:07vstinnerlinkissue27277 messages
2021-09-07 16:45:07vstinnercreate