Skip to content

exec() crashes Rust Python when taking large expression as argument #2783

Description

@xiaxinmeng

When we set the argument of exec() as a complex expression, Rust Python interpreter crashes Please check the following example. This example triggers segmentation fault on Rust Python 0.1.2 interpreter.

test.py

mylist = []
n = 10000
print(exec("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

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions