Skip to content

Commit

Permalink
pythongh-121921: Make bogus_code_obj.py crash the interpreter
Browse files Browse the repository at this point in the history
  • Loading branch information
JelleZijlstra committed Jul 17, 2024
1 parent ac07451 commit 5b6d8fb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Lib/test/crashers/bogus_code_obj.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"""

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()
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Update ``Lib/test/crashers/bogus_code_obj.py`` so that it crashes properly
again.

0 comments on commit 5b6d8fb

Please sign in to comment.