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.
V
Victor Stinner committed
fb305092a5d7894b41f122c1a1117b3abf4c567e
Parent: 979336d
Committed by GitHub <noreply@github.com>
on 9/7/2021, 1:42:11 PM