Skip to content

Parser crashes on deeply nested input #870

@JohannesLks

Description

@JohannesLks

Deeply nested Jsonnet input causes a stack overflow in the recursive descent
parser, since there is no depth limit on parse() calls.

python3 -c "print('(' * 100000 + '1' + ')' * 100000)" > crash.jsonnet
jsonnet crash.jsonnet
# fatal error: stack overflow

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