Crash report
We like to pretend that _Py_Dealloc (and, by extension, Py_DECREF, Py_XDECREF, Py_CLEAR, PyStackRef_CLOSE, PyStackRef_CLEAR, etc...) isn't an escaping call in tier two. However, it's perfectly capable of invalidating the world. For example, the following code crashes when run under the JIT:
import sys
class Crashy:
def __del__(self):
ns = sys._getframe(1).f_locals
if ns["i"] == 999:
ns["i"] = None
def crashy():
for i in range(1000):
n = Crashy()
i + i # Remove guards for i.
n = None # Change i.
i + i # Crash!
crashy()
Longer term, we're hoping that removing refcounting operations in tier two will help us out here. Fortunately, the _SET_IP and _CHECK_VALIDITY instructions necessary to fix this issue aren't expensive enough to show up on benchmarks when added back (for now).
Linked PRs
Crash report
We like to pretend that
_Py_Dealloc(and, by extension,Py_DECREF,Py_XDECREF,Py_CLEAR,PyStackRef_CLOSE,PyStackRef_CLEAR, etc...) isn't an escaping call in tier two. However, it's perfectly capable of invalidating the world. For example, the following code crashes when run under the JIT:Longer term, we're hoping that removing refcounting operations in tier two will help us out here. Fortunately, the
_SET_IPand_CHECK_VALIDITYinstructions necessary to fix this issue aren't expensive enough to show up on benchmarks when added back (for now).Linked PRs
_Py_Deallocas an escaping call in tier two #124615Py_DECREF, etc. as escaping for the JIT #128678