[llvm-bugs] [Bug 51093] New: clang::format::WhitespaceManager::alignConsecutiveAssignments() crash

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Jul 14 12:39:09 PDT 2021


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

            Bug ID: 51093
           Summary: clang::format::WhitespaceManager::alignConsecutiveAssi
                    gnments() crash
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Formatter
          Assignee: unassignedclangbugs at nondot.org
          Reporter: sbauer230 at hotmail.com
                CC: djasper at google.com, klimek at google.com,
                    llvm-bugs at lists.llvm.org

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 https://bugs.llvm.org/ 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)

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210714/6ac4e569/attachment.html>


More information about the llvm-bugs mailing list