[llvm-bugs] [Bug 51926] New: clang-format 13 crash with AlignArrayOfStructures: left

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Sep 21 04:16:23 PDT 2021


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

            Bug ID: 51926
           Summary: clang-format 13 crash with AlignArrayOfStructures:
                    left
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: release blocker
          Priority: P
         Component: Formatter
          Assignee: unassignedclangbugs at nondot.org
          Reporter: feildel at corona-renderer.com
                CC: djasper at google.com, klimek at google.com,
                    llvm-bugs at lists.llvm.org

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

-- 
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/20210921/561e2c27/attachment-0001.html>


More information about the llvm-bugs mailing list