-
-
Notifications
You must be signed in to change notification settings - Fork 33.8k
Closed as not planned
Closed as not planned
Copy link
Labels
type-crashA hard crash of the interpreter, possibly with a core dumpA hard crash of the interpreter, possibly with a core dump
Description
Crash report
What happened?
import dis
import io
import types
import contextlib
import unittest
class DisTests(unittest.TestCase):
def f(x):
return x + 1
code = f.__code__
try:
new_code = code.replace(co_linetable=b'\xa0\xa1')
except (AttributeError, TypeError, ValueError):
self.skipTest("code.replace(co_linetable=...) not supported on this Python build")
fn = types.FunctionType(new_code, f.__globals__, name=f.__name__,
argdefs=f.__defaults__, closure=f.__closure__)
buf = io.StringIO()
with contextlib.redirect_stdout(buf):
dis.dis(fn)python: ../Objects/codeobject.c:1225: advance_with_locations: Assertion `(second_byte & 128) == 0' failed.
Aborted (core dumped)
CPython versions tested on:
CPython main branch
Operating systems tested on:
Linux
Output from running 'python -VV' on the command line:
No response
Metadata
Metadata
Assignees
Labels
type-crashA hard crash of the interpreter, possibly with a core dumpA hard crash of the interpreter, possibly with a core dump