gh-121921: Make bogus_code_obj.py crash the interpreter (#121922)
This commit is contained in:
@@ -12,8 +12,8 @@ the user build or load random bytecodes anyway. Otherwise, this is a
|
||||
|
||||
"""
|
||||
|
||||
import types
|
||||
def f():
|
||||
pass
|
||||
|
||||
co = types.CodeType(0, 0, 0, 0, 0, 0, b'\x04\x00\x71\x00',
|
||||
(), (), (), '', '', 1, b'')
|
||||
exec(co)
|
||||
f.__code__ = f.__code__.replace(co_code=b"")
|
||||
f()
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
Update ``Lib/test/crashers/bogus_code_obj.py`` so that it crashes properly
|
||||
again.
|
||||
Reference in New Issue
Block a user