Author lemburg
Recipients asvetlov, lemburg, njs, tim.peters, twouters, yselivanov
Date 2020-05-27.07:27:20
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <997819e1-d94a-d72a-199e-0de2522facfa@egenix.com>
In-reply-to <1590551791.79.0.515609150701.issue40789@roundup.psfhosted.org>
Content
On 27.05.2020 05:56, Nathaniel Smith wrote:
> In CPython in general, it could be worked around by not invoking deallocators with a live exception... I'm actually pretty surprised that this is even possible! It seems like having a live exception when you start executing arbitrary Python code would be bad. So maybe that's the real bug? Adding both "asyncio" and "memory management" interest groups to the nosy.

Exception handlers can execute arbitrary Python code, so it's not
surprising that objects get allocated, deallocated, etc.

What you're describing sounds more like a problem with the PySide2
code not being reentrant. Clearing exceptions always has to be done
with some care. It's normally only applied to replace the exception
with a more specific one, when the exception is expected and handled
in the C code, or when there is no way to report the exception back
up the stack.

Note: Even the PyErr_Print() can result in Python code being
executed and because it's likely that PySide2 objects are part
of the stack trace, even PySide2 methods may be called as a result.

-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Experts (#1, May 27 2020)
>>> Python Projects, Coaching and Support ...    https://www.egenix.com/
>>> Python Product Development ...        https://consulting.egenix.com/
________________________________________________________________________

::: We implement business ideas - efficiently in both time and costs :::

   eGenix.com Software, Skills and Services GmbH  Pastor-Loeh-Str.48
    D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
           Registered at Amtsgericht Duesseldorf: HRB 46611
               https://www.egenix.com/company/contact/
                     https://www.malemburg.com/
History
Date User Action Args
2020-05-27 07:27:20lemburgsetrecipients: + lemburg, tim.peters, twouters, njs, asvetlov, yselivanov
2020-05-27 07:27:20lemburglinkissue40789 messages
2020-05-27 07:27:20lemburgcreate