<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/55912>55912</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            clang-format crashes when formatting thousands of levels of nested blocks
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang-format,
            crash
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
            owenca
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          owenca
      </td>
    </tr>
</table>

<pre>
    ```
C:> clang-format.exe -version
clang-format version 15.0.0 (https://github.com/llvm/llvm-project cf88150c48df4e779edb91a8facf838bea3bd1b7)
C:> clang-format.exe clang\test\Parser\parser_overflow.c > NUL
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0.      Program arguments: clang-format.exe clang\\test\\Parser\\parser_overflow.c
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJydUk2PmzAU_DVweQoyBgc4cEiz6WlVRVr1XPnjAe4aHNkmaf99DaTdVOqqai1Lfm8Ge2ZshFXf22RP7pM8JeRwTIpDUpxAGj71u866kYcMvyHsrui8ttP22SMNdwZylpGMQELrIYSLX06iH-PsdRhmkUk7xsaY689ld3H2K8oAsqvrnBFZ1qorsaoaVKLJed3xyBS1QF4IlYsqoc1fXK5Awo4BfYjLmTuPLhaXtfhio9XO2FsmYdn-6fPzdt75-XR4OYGfxagDcBBzDw4v1gUIFv4tTWy19zP6WACfFOhJmlkhhCH6c9wPILh8DY5LzDb5lxABUPN4WVRWiGSwjrOzveMjcNfPI05h8fF-7Lfkj-H_lH9T-fX4qWoL1RQNT4MOBtvf3nc1jR5uA06wYUFPfQxkZx8TerAdGLyiWaspOkAFwlj56tPZmfb_L5CxJqfp0FZlQwqVs73EUtG6URWqsmNM0qqjhRSp4SLKtwn7kFD66D62CT3Cgi4xlpY9pbqlhFKyJ1VOCpbXWdmUTKhCqShI9l2elARHrk22OMus61PXribjr-EjabQP_o3k3ut-QrwbsDecJL9r8TlelGs3LF2jtWuuH4cjH1I">