Skip to content

Evaluating a long list with eval() causes segfault. #2781

@xiaxinmeng

Description

@xiaxinmeng

See the following example, we take a long computation of list addition operation. RustPython crashes.

test.py

mylist = []
n = 10000
print(eval("mylist"+"+mylist"*n))

Actual output:

Segmentation fault (core dumped)

System:

Ubuntu 16.04
Rust Python 0.1.2 interpreter

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