New submission from Serhiy Storchaka <storchaka+cpyt...@gmail.com>:

>>> def f(): pass
... 
>>> co = f.__code__.replace(co_linetable=b'')
>>> import dis
>>> dis.dis(co)
python: Objects/codeobject.c:1185: PyLineTable_NextAddressRange: Assertion 
`!at_end(range)' failed.
Aborted (core dumped)

It is expected that executing bogus code object can crash (or cause any other 
effect). But it is surprising that just inspecting it causes a crash.

----------
components: Interpreter Core
messages: 383741
nosy: Mark.Shannon, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Crash when try to disassemble bogus code object
type: crash
versions: Python 3.10

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue42739>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to