Skip to content

ANN401 induces a stack overflow on quoted quoted escape sequences #14695

@dscorbett

Description

@dscorbett

any-type (ANN401) overflows the stack in Ruff 0.6.4 through Ruff 0.8.1 for a quoted annotation with an extra layer of quotation marks containing an escape sequence.

$ cat ann401.py
def f(x: "'in\x74'"): pass

$ ruff check --isolated --select ANN401 ann401.py

thread 'main' has overflowed its stack
fatal runtime error: stack overflow

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedContributions especially welcomeparserRelated to the parser

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions