https://bugs.llvm.org/show_bug.cgi?id=41964
Bug ID: 41964
Summary: clang-format: crash with SIGFPE when TabWidth is set
to 0 and line starts with tab
Product: clang
Version: 8.0
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Formatter
Assignee: unassignedclangb...@nondot.org
Reporter: mateusz.szychow...@blackstarsoftware.com
CC: djas...@google.com, kli...@google.com,
llvm-bugs@lists.llvm.org
clang-format 8.0 crashes with SIGFPE (floating point exception) when formatting
following file:
app.cpp:
void a() {
//line starts with '\t'
}
$ clang-format -style='{TabWidth: 0}' app.cpp
Stack dump:
0. Program arguments: clang-format -style={TabWidth: 0} app.cpp
/lib/x86_64-linux-gnu/libLLVM-8.so.1(_ZN4llvm3sys15PrintStackTraceERNS_11raw_ostreamE+0x1f)[0x7f25b84aadff]
/lib/x86_64-linux-gnu/libLLVM-8.so.1(_ZN4llvm3sys17RunSignalHandlersEv+0x50)[0x7f25b84a9250]
/lib/x86_64-linux-gnu/libLLVM-8.so.1(+0x976208)[0x7f25b84ab208]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x13f40)[0x7f25bb789f40]
clang-format[0x46419c]
clang-format[0x463d48]
clang-format[0x439e0a]
clang-format[0x43191c]
clang-format[0x42402b]
clang-format[0x424773]
clang-format[0x40c757]
clang-format[0x40ba14]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xeb)[0x7f25b7627b6b]
clang-format[0x40b50a]
Floating point exception (core dumped)
reproduced on:
Manjaro Linux (Linux 5.1.1-2-MANJARO)
Arch Linux Docker Image
Ubuntu 19.04 Docker Image
Ubuntu 18.04 (with clang-format 7)
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs