Bug#910450: clang-8: Segfaults compiling dpkg/src/remove.c

Guillem Jover guillem at debian.org
Sat Oct 6 14:44:39 BST 2018


Package: clang-8
Version: 1:8~svn343154-1
Severity: normal

Hi!

I tend to check whether dpkg compiles with latest clang from time to
time. And this time around I got a segfault. Here's the stack dump,
and attached are the two other files, where I've replaced the absolute
path to the source tree with <BUILDDIR>:

,---
[…]
  CC       remove.o
Stack dump:
0.      Program arguments: /usr/lib/llvm-8/bin/clang -cc1 -triple x86_64-pc-linux-gnu -emit-obj -disable-free -disable-llvm-verifier -discard-value-names -main-file-name remove.c -mrelocation-model static -mthread-model posix -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64 -dwarf-column-info -debug-info-kind=limited -dwarf-version=4 -debugger-tuning=gdb -momit-leaf-frame-pointer -coverage-notes-file <BUILDDIR>/dpkg/src/remove.gcno -resource-dir /usr/lib/llvm-8/lib/clang/8.0.0 -dependency-file .deps/remove.Tpo -sys-header-deps -MP -MT remove.o -idirafter ../lib/compat -D HAVE_CONFIG_H -D LOCALEDIR="/usr/local/share/locale" -D ADMINDIR="/usr/local/var/lib/dpkg" -I .. -I ../lib -internal-isystem /usr/local/include -internal-isystem /usr/lib/llvm-8/lib/clang/8.0.0/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -O2 -Wall -Wextra -Wcast-align -Wdocumentation -Wformat -Wformat-security -Winit-self -Wlogical-not-parentheses -Wmissing-declarations -Wmissing-format-attribute -Wno-missing-field-initializers -Wno-tautological-constant-out-of-range-compare -Wno-unused-parameter -Wnull-dereference -Wpointer-arith -Wregister -Wshadow -Wshift-negative-value -Wsizeof-array-argument -Wswitch-bool -Wvla -Wwrite-strings -Wbad-function-cast -Wdeclaration-after-statement -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wstrict-prototypes -fconst-strings -fdebug-compilation-dir <BUILDDIR>/dpkg/src -ferror-limit 19 -fmessage-length 79 -fobjc-runtime=gcc -fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops -vectorize-slp -o remove.o -x c remove.c -faddrsig
1.      <eof> parser at end of file
2.      Code generation
3.      Running pass 'Function Pass Manager' on module 'remove.c'.
4.      Running pass 'Greedy Register Allocator' on function '@removal_bulk'
/usr/lib/x86_64-linux-gnu/libLLVM-8.so.1(_ZN4llvm3sys15PrintStackTraceERNS_11raw_ostreamE+0x1a)[0x7f4f95d1763a]
/usr/lib/x86_64-linux-gnu/libLLVM-8.so.1(_ZN4llvm3sys17RunSignalHandlersEv+0x34)[0x7f4f95d15cd4]
/usr/lib/x86_64-linux-gnu/libLLVM-8.so.1(+0xa45e35)[0x7f4f95d15e35]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x128e0)[0x7f4f993628e0]
/usr/lib/x86_64-linux-gnu/libLLVM-8.so.1(+0xdd09f8)[0x7f4f960a09f8]
/usr/lib/x86_64-linux-gnu/libLLVM-8.so.1(+0xdd65b5)[0x7f4f960a65b5]
/usr/lib/x86_64-linux-gnu/libLLVM-8.so.1(+0xddb05e)[0x7f4f960ab05e]
/usr/lib/x86_64-linux-gnu/libLLVM-8.so.1(+0xddb236)[0x7f4f960ab236]
/usr/lib/x86_64-linux-gnu/libLLVM-8.so.1(_ZN4llvm12RegAllocBase16allocatePhysRegsEv+0xa9)[0x7f4f96094c89]
/usr/lib/x86_64-linux-gnu/libLLVM-8.so.1(+0xdd4da4)[0x7f4f960a4da4]
/usr/lib/x86_64-linux-gnu/libLLVM-8.so.1(+0xcf947b)[0x7f4f95fc947b]
/usr/lib/x86_64-linux-gnu/libLLVM-8.so.1(_ZN4llvm13FPPassManager13runOnFunctionERNS_8FunctionE+0x318)[0x7f4f95dfb238]
/usr/lib/x86_64-linux-gnu/libLLVM-8.so.1(_ZN4llvm13FPPassManager11runOnModuleERNS_6ModuleE+0x33)[0x7f4f95dfb2f3]
/usr/lib/x86_64-linux-gnu/libLLVM-8.so.1(_ZN4llvm6legacy15PassManagerImpl3runERNS_6ModuleE+0x30a)[0x7f4f95dfa7ea]
/usr/lib/llvm-8/bin/clang(+0x4e2ddd)[0x55cde9a39ddd]
/usr/lib/llvm-8/bin/clang(_ZN5clang17EmitBackendOutputERNS_17DiagnosticsEngineERKNS_19HeaderSearchOptionsERKNS_14CodeGenOptionsERKNS_13TargetOptionsERKNS_11LangOptionsERKN4llvm10DataLayoutEPNSE_6ModuleENS_13BackendActionESt10unique_ptrINSE_17raw_pwrite_streamESt14default_deleteISM_EE+0x474)[0x55cde9a3b7a4]
/usr/lib/llvm-8/bin/clang(+0xab0edc)[0x55cdea007edc]
/usr/lib/llvm-8/bin/clang(_ZN5clang8ParseASTERNS_4SemaEbb+0x3a1)[0x55cdea66e081]
/usr/lib/llvm-8/bin/clang(_ZN5clang13CodeGenAction13ExecuteActionEv+0x21)[0x55cdea005b51]
/usr/lib/llvm-8/bin/clang(_ZN5clang14FrontendAction7ExecuteEv+0x86)[0x55cde9e535d6]
/usr/lib/llvm-8/bin/clang(_ZN5clang16CompilerInstance13ExecuteActionERNS_14FrontendActionE+0x156)[0x55cde9e1d106]
/usr/lib/llvm-8/bin/clang(_ZN5clang25ExecuteCompilerInvocationEPNS_16CompilerInstanceE+0x70b)[0x55cde9efd71b]
/usr/lib/llvm-8/bin/clang(_Z8cc1_mainN4llvm8ArrayRefIPKcEES2_Pv+0x878)[0x55cde99e0f48]
/usr/lib/llvm-8/bin/clang(main+0x26dd)[0x55cde99d035d]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7)[0x7f4f94e04b17]
/usr/lib/llvm-8/bin/clang(_start+0x2a)[0x55cde99dee3a]
clang: error: unable to execute command: Segmentation fault (core dumped)
clang: error: clang frontend command failed due to signal (use -v to see invocation)
clang version 8.0.0-svn343154-1 (trunk)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
clang: note: diagnostic msg: PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace, preprocessed source, and associated run script.
clang: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /tmp/remove-4a1ad3.c
clang: note: diagnostic msg: /tmp/remove-4a1ad3.sh
clang: note: diagnostic msg:

********************
`---

Thanks,
Guillem
-------------- next part --------------
A non-text attachment was scrubbed...
Name: remove-4a1ad3.c.xz
Type: application/x-xz
Size: 109824 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-llvm-team/attachments/20181006/8a1c6325/attachment-0001.xz>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: remove-4a1ad3.sh
Type: application/x-sh
Size: 4303 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-llvm-team/attachments/20181006/8a1c6325/attachment-0001.sh>


More information about the Pkg-llvm-team mailing list