[issue46689] `list(FunctionType(a.gi_code, {})(0))` crashes Python

2022-02-09 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: See also https://bugs.python.org/issue36956 -- nosy: +xtreak ___ Python tracker ___ ___

[issue46689] `list(FunctionType(a.gi_code, {})(0))` crashes Python

2022-02-09 Thread Nikita Sobolev
New submission from Nikita Sobolev : Here's the simplest reproduction: ``` from types import FunctionType a = (x for x in [1]) list(FunctionType(a.gi_code, {})(0)) ``` I understand that the code above does not make much sense, but I still think it should not crash. Demo: ``` ยป PYTHONFAULTHAN