Skip to content

A long string in ast.parse() leads to a segfault #4857

@xiaxinmeng

Description

@xiaxinmeng

ast.parse() takes a long string as the argument leading to a segfault.

test.py

import ast
x = ast.parse('+chr(33)'*1000000)

Crash message: Segmentation fault (core dumped)

Environment:
Ubuntu 18.04
rustpython v0.2.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions