[llvm-bugs] [Bug 49966] New: Parser stuck in loop after commit 5ad15f4d1c6

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Apr 14 21:11:37 PDT 2021


https://bugs.llvm.org/show_bug.cgi?id=49966

            Bug ID: 49966
           Summary: Parser stuck in loop after commit 5ad15f4d1c6
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: douglas_yung at playstation.sony.com
                CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org

One of our internal tests hit an issue where the compiler was running for hours
on a test that should compile and give an error in under a second. Judging from
the error messages that the compiler emits, it appears that it is getting stuck
in an infinite loop while parsing.

Consider the following code:

/* test4a.cpp */
[[deprecated([""])]]

Compiled with a good compiler, we expect the following error messages:

$ ~/src/upstream/eb31540066736658a71d7fc1154be8432e553a11-linux/bin/clang -c
test4a.cpp
test4a.cpp:1:15: error: expected variable name or 'this' in lambda capture list
[[deprecated([""])]]
              ^
test4a.cpp:1:21: error: expected ']'
[[deprecated([""])]]
                    ^
                    ]
test4a.cpp:1:21: error: expected ']'
[[deprecated([""])]]
                    ^
                    ]
test4a.cpp:1:21: error: expected external declaration
4 errors generated.

But when built with a compiler built from
5ad15f4d1c6f56d25904265023d123a7d0b9d59d, we end up with the following output:

$ ~/src/upstream/5ad15f4d1c6f56d25904265023d123a7d0b9d59d-linux/bin/clang -c
test4a.cpp
test4a.cpp:1:15: error: expected variable name or 'this' in lambda capture list
[[deprecated([""])]] 
              ^      
test4a.cpp:1:21: error: expected ','
[[deprecated([""])]]
                    ^
                    ,
test4a.cpp:1:21: error: expected ','
[[deprecated([""])]]
                    ^
                    ,
...
<same error is repeated many times>
...
fatal error: too many errors emitted, stopping now [-ferror-limit=]

Ultimately I have to kill the compiler as it just keeps running indefinitely.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210415/2c186625/attachment.html>


More information about the llvm-bugs mailing list