0
0
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:
Jelle Zijlstra 2024-07-18 01:02:08 -07:00 committed by GitHub
parent c5a6b9afd8
commit 63ddd28cf3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 4 deletions

View File

@ -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()

View File

@ -0,0 +1,2 @@
Update ``Lib/test/crashers/bogus_code_obj.py`` so that it crashes properly
again.