Skip to content

ICE on extremely deeply nested syntax #34844

Description

@DemiMarie

The following shell scripts all cause a stack overflow in the compiler:

python -c 'print("("*100000 + ")"*100000)'| rustc /dev/fd/0
python -c 'print("{"*100000 + "}"*100000)'| rustc /dev/fd/0
python -c 'print("{("*100000 + "})"*100000)'| rustc /dev/fd/0

This should be fixed (perhaps by making the parser non-recursive, or by setting an explicit recursion limit).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions