<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 - clang-format 13 crash with AlignArrayOfStructures: left"
href="https://bugs.llvm.org/show_bug.cgi?id=51926">51926</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>clang-format 13 crash with AlignArrayOfStructures: left
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Windows NT
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>release blocker
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Formatter
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>feildel@corona-renderer.com
</td>
</tr>
<tr>
<th>CC</th>
<td>djasper@google.com, klimek@google.com, llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>While checking out in advance clang-format 13 we found a crash when using the
new AlignArrayOfStructures option.
Here is the minimal case to reproduce it:
```.clang-format
AlignArrayOfStructures: Left
```
```foo.cpp
auto foo = Items{ Section{ 0, bar(), } };
```
And the backtrace:
```
Assertion failed: idx < size(), file
C:\src\llvm_package_1300-rc3\llvm-project\llvm\include\llvm/ADT/SmallVector.h,
line 281
PLEASE submit a bug report to <a href="https://bugs.llvm.org/">https://bugs.llvm.org/</a> and include the crash
backtrace.
Stack dump:
0. Program arguments: D:\\llvm\\13.0.0-rc3\\bin\\clang-format.exe
clang-format-13-crash.cpp
#0 0x00007ff78fd924d6 (D:\llvm\13.0.0-rc3\bin\clang-format.exe+0x324d6)
#1 0x00007ffcf3d61881 (C:\WINDOWS\System32\ucrtbase.dll+0x71881)
#2 0x00007ffcf3d62851 (C:\WINDOWS\System32\ucrtbase.dll+0x72851)
#3 0x00007ffcf3d6426e (C:\WINDOWS\System32\ucrtbase.dll+0x7426e)
#4 0x00007ffcf3d64165 (C:\WINDOWS\System32\ucrtbase.dll+0x74165)
#5 0x00007ffcf3d644f1 (C:\WINDOWS\System32\ucrtbase.dll+0x744f1)
#6 0x00007ff78fe39d6c (D:\llvm\13.0.0-rc3\bin\clang-format.exe+0xd9d6c)
#7 0x00007ff78fe399c7 (D:\llvm\13.0.0-rc3\bin\clang-format.exe+0xd99c7)
#8 0x00007ff78fe384b9 (D:\llvm\13.0.0-rc3\bin\clang-format.exe+0xd84b9)
#9 0x00007ff78fe37b7e (D:\llvm\13.0.0-rc3\bin\clang-format.exe+0xd7b7e)
#10 0x00007ff78fe33c46 (D:\llvm\13.0.0-rc3\bin\clang-format.exe+0xd3c46)
#11 0x00007ff78fdf6ffe (D:\llvm\13.0.0-rc3\bin\clang-format.exe+0x96ffe)
#12 0x00007ff78fe0cf4c (D:\llvm\13.0.0-rc3\bin\clang-format.exe+0xacf4c)
#13 0x00007ff78fe030e4 (D:\llvm\13.0.0-rc3\bin\clang-format.exe+0xa30e4)
#14 0x00007ff78fdedd8f (D:\llvm\13.0.0-rc3\bin\clang-format.exe+0x8dd8f)
#15 0x00007ff78fdee6b9 (D:\llvm\13.0.0-rc3\bin\clang-format.exe+0x8e6b9)
#16 0x00007ff78fd636b2 (D:\llvm\13.0.0-rc3\bin\clang-format.exe+0x36b2)
#17 0x00007ff78fd62056 (D:\llvm\13.0.0-rc3\bin\clang-format.exe+0x2056)
#18 0x00007ff78ff10d34 (D:\llvm\13.0.0-rc3\bin\clang-format.exe+0x1b0d34)
#19 0x00007ffcf5907034 (C:\WINDOWS\System32\KERNEL32.DLL+0x17034)
#20 0x00007ffcf6622651 (C:\WINDOWS\SYSTEM32\ntdll.dll+0x52651)
```</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>