[issue29096] Signal Handlers reliably cause UnboundLocalErrors
Joe Jevnik
report at bugs.python.org
Wed Dec 28 15:49:00 EST 2016
Joe Jevnik added the comment:
The issue appears to be in ceval.c:unicode_concatenate (or the py2 equivalent)
The code sets the local variable on the lhs to NULL before doing a potentially inplace append to the string. This means that if a signal is raised during the concat, we never hit the STORE_FAST instruction following the INPLACE_ADD so the local or cell still holds NULL, triggering an error.
I am not really sure what can be done to prevent the failure while still allowing the optimization.
----------
components: +Interpreter Core
nosy: +llllllllll
type: crash ->
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue29096>
_______________________________________
More information about the Python-bugs-list
mailing list