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

            Bug ID: 45333
           Summary: r372359 causes stack overflow parsing large array
           Product: clang
           Version: 10.0
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Frontend
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected], [email protected]
            Blocks: 45309

We have some generated code which creates a large std::array. After r372359,
clang appears to call AnalyzeImplicitConversions recursively for each array
element, which leads to a stack overflow for a sufficiently large array. Simple
repro:

$ python -c "print '#include <array>\n static constexpr std::array a {\n  %s
\n};' % ',\n  '.join(['0.0f']*65536)" > /tmp/test.cpp
$ clang -std=c++17 -fsyntax-only /tmp/test.cpp

Explicitly passing the size of the array (std::array<float, n>) avoids this,
but it's still a regression from Clang 9.


Referenced Bugs:

https://bugs.llvm.org/show_bug.cgi?id=45309
[Bug 45309] [meta] 10.0.1 Release Blockers
-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to