[llvm-bugs] [Bug 41964] New: clang-format: crash with SIGFPE when TabWidth is set to 0 and line starts with tab
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue May 21 07:25:44 PDT 2019
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: unassignedclangbugs at nondot.org
Reporter: mateusz.szychowski at blackstarsoftware.com
CC: djasper at google.com, klimek at google.com,
llvm-bugs at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190521/f3fe96ba/attachment.html>
More information about the llvm-bugs
mailing list