Skip to content

Segmentation Fault When Running Bytecode Modification Code on Python 3.13.0b1 #123731

@zzl261004

Description

@zzl261004

Crash report

What happened?

import dis
func = lambda: None
func.__code__ = func.__code__.replace(co_code=bytes([dis.opmap['POP_TOP'], 0]))
func()

CPython versions tested on:

CPython main branch

Operating systems tested on:

Linux

Output from running 'python -VV' on the command line:

Segmentation fault (core dumped)

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-crashA hard crash of the interpreter, possibly with a core dump

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions