New submission from Pablo Galindo Salgado <pablog...@gmail.com>:

When evaluating a frame object, it is possible to exit the execution with some 
variables in the stack. The frame deallocator (frame_dealloc) only cleans the 
stack if f_stacktop is not NULL, but this only happens for generators and when 
trace functions are set. The eval loop does this cleanup already if an 
exception is being raised, but not if a RETURN_VALUE is set.

In the PyconUS sprints, Dino and I have been working on this and we have 
decided that the cleanest approach is shared the same goto label with the path 
for exception handling, effectively cleaning up

----------
components: Interpreter Core
messages: 341891
nosy: dino.viehland, pablogsal
priority: normal
severity: normal
status: open
title: Frame stack is not cleaned after execution is finished with return
versions: Python 3.8

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue36851>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to