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
Interestingly, this is an interpreter crash, not a compiler crash, even though we never call the function. The crash happens inside COPY_FREE_VARS, because the function's func_closure is NULL.
When we disassemble it we can see why:
>>> dis.dis("""
... def f():
... [([lambda: x for x in range(4)], lambda: x) for x in range(3)]
... """)
0 COPY_FREE_VARS 1
0 2 RESUME 0
2 4 LOAD_CONST 0 (<code object f at 0x104d2b740, file "<dis>", line 2>)
6 MAKE_FUNCTION 0
8 STORE_NAME 0 (f)
10 RETURN_CONST 1 (None)
Disassembly of <code object f at 0x104d2b740, file "<dis>", line 2>:
<snip>
There is a COPY_FREE_VARS at the module scope, but there is no closure to copy at that level.
Still reproduces with the fix from #104394 applied. cc @carljm
This is another crasher related to PEP 709.
Stack trace:
Interestingly, this is an interpreter crash, not a compiler crash, even though we never call the function. The crash happens inside
COPY_FREE_VARS
, because the function'sfunc_closure
is NULL.When we disassemble it we can see why:
There is a
COPY_FREE_VARS
at the module scope, but there is no closure to copy at that level.Still reproduces with the fix from #104394 applied. cc @carljm
Linked PRs
The text was updated successfully, but these errors were encountered: