mirror of
https://github.com/python/cpython.git
synced 2024-11-21 21:09:37 +01:00
gh-121921: Make bogus_code_obj.py crash the interpreter (#121922)
This commit is contained in:
parent
c5a6b9afd8
commit
63ddd28cf3
@ -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.
|
Loading…
Reference in New Issue
Block a user