You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In https://github.com/python/cpython/pull/130708/files#r2005817604
we want to replace an input variable, writing v = PyStackRef_MakeHeapSafe(v); but the code generator rejects this as unsafe: "writing to an input variable".
This mostly a good restriction as we don't want to accidentally lose a reference, but we should allow the replacement when it is safe.
This should be allowed:
tmp = PyStackRef_MakeHeapSafe(v);
DEAD(v);
v = tmp;
As we only write to a dead variable, which is safe.
Bug report
Bug description:
In https://github.com/python/cpython/pull/130708/files#r2005817604
we want to replace an input variable, writing
v = PyStackRef_MakeHeapSafe(v);
but the code generator rejects this as unsafe: "writing to an input variable".This mostly a good restriction as we don't want to accidentally lose a reference, but we should allow the replacement when it is safe.
This should be allowed:
As we only write to a dead variable, which is safe.
CPython versions tested on:
CPython main branch
Operating systems tested on:
No response
Linked PRs
The text was updated successfully, but these errors were encountered: