<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - r372359 causes stack overflow parsing large array"
   href="https://bugs.llvm.org/show_bug.cgi?id=45333">45333</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>r372359 causes stack overflow parsing large array
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>10.0
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Frontend
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>smeenai@fb.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org, neeilans@live.com, richard-llvm@metafoo.co.uk, tstellar@redhat.com
          </td>
        </tr>

        <tr>
          <th>Blocks</th>
          <td>45309
          </td>
        </tr></table>
      <p>
        <div>
        <pre>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.</pre>
        </div>
      </p>

        <div id="referenced">
          <hr style="border: 1px dashed #969696">
          <b>Referenced Bugs:</b>
          <ul>
              <li>
                [<a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [meta] 10.0.1 Release Blockers"
   href="https://bugs.llvm.org/show_bug.cgi?id=45309">Bug 45309</a>] [meta] 10.0.1 Release Blockers
              </li>
          </ul>
        </div>
        <br>

      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>