Skip to content

heap corruption while parsing huge comment #99581

Closed
@9001

Description

@9001

Crash report

A very large comment in heapcrpt.py causes tokenizer.c to perform an illegal write, leading to heap corruption and crashing the interpreter

Error messages

Linux/glibc: double free or corruption (!prev)
Windows: 0xc0000374 in event viewer

Your environment

Reproduced on cpython 3.10.0, 3.10.8, 3.12.0a2
Reproduced on fedora 35 (x64), windows 10 (x64, 17763.316)

Not reproduced on cpython 3.9.15
Not visibly reproduced on macos 10.13

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    interpreter-core(Objects, Python, Grammar, and Parser dirs)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