<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::WhitespaceManager::alignConsecutiveAssignments() crash"
href="https://bugs.llvm.org/show_bug.cgi?id=51093">51093</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>clang::format::WhitespaceManager::alignConsecutiveAssignments() crash
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</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>Formatter
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>sbauer230@hotmail.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>Running into a crash with the main branch.
Tried commits 50cf0a1d1ae48bd0397b41a400e01c62975b6706a and
18c19414eb70578d4c487d6f4b0f438aead71d6a
---------- CRASH
$ clang-format -style=file -i format_this.c
clang-format:
/source/repos/llvm-project/clang/lib/Format/WhitespaceManager.cpp:367: void
clang::format::AlignTokenSequence(unsigned int, unsigned int, unsigned int,
F&&, llvm::SmallVector<clang::format::WhitespaceManager::Change, 16>&) [with F
=
clang::format::WhitespaceManager::alignConsecutiveAssignments()::<lambda(const
clang::format::WhitespaceManager::Change&)>&]: Assertion `Shift >= 0' failed.
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: clang-format -style=file -i format_this.c
Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH
or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
clang-format[0x4c9ef9]
clang-format[0x4c9fb0]
clang-format[0x4c7fa6]
clang-format[0x4c994c]
/lib64/libpthread.so.0(+0xf630)[0x7efc99a40630]
/lib64/libc.so.6(gsignal+0x37)[0x7efc98b5f387]
/lib64/libc.so.6(abort+0x148)[0x7efc98b60a78]
/lib64/libc.so.6(+0x2f1a6)[0x7efc98b581a6]
/lib64/libc.so.6(+0x2f252)[0x7efc98b58252]
clang-format[0x5d22be]
clang-format[0x5cfcf1]
clang-format[0x5d0298]
clang-format[0x5ce592]
clang-format[0x5cd5a0]
clang-format[0x54afa5]
clang-format[0x58ce4f]
clang-format[0x54fdb3]
clang-format[0x557bbe]
clang-format[0x5565df]
clang-format[0x555714]
clang-format[0x5678ad]
clang-format[0x5502a9]
clang-format[0x550577]
clang-format[0x406969]
clang-format[0x4075ff]
/lib64/libc.so.6(__libc_start_main+0xf5)[0x7efc98b4b555]
clang-format[0x404f7e]
Aborted (core dumped)</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>