clang crashed with SIGSEGV in llvm::DIEEntry::EmitValue()

Bug #1198068 reported by Chris Halse Rogers
16
This bug affects 1 person
Affects Status Importance Assigned to Milestone
llvm-toolchain-snapshot (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

I've hit a reproducible crasher in clang when compiling a C++ source file:

0 libLLVM-3.4.so.1 0x00002aaaabb293a2 llvm::sys::PrintStackTrace(_IO_FILE*) + 34
1 libLLVM-3.4.so.1 0x00002aaaabb29209
2 libpthread.so.0 0x00002aaaac39bbd0
3 libLLVM-3.4.so.1 0x00002aaaab2b4d6a llvm::DIEEntry::EmitValue(llvm::AsmPrinter*, unsigned int) const + 10
4 libLLVM-3.4.so.1 0x00002aaaab2c63e0 llvm::DwarfDebug::emitDIE(llvm::DIE*, std::vector<llvm::DIEAbbrev*, std::allocator<llvm::DIEAbbrev*> >*) + 592
5 libLLVM-3.4.so.1 0x00002aaaab2c6579 llvm::DwarfDebug::emitDIE(llvm::DIE*, std::vector<llvm::DIEAbbrev*, std::allocator<llvm::DIEAbbrev*> >*) + 1001
6 libLLVM-3.4.so.1 0x00002aaaab2c6579 llvm::DwarfDebug::emitDIE(llvm::DIE*, std::vector<llvm::DIEAbbrev*, std::allocator<llvm::DIEAbbrev*> >*) + 1001
7 libLLVM-3.4.so.1 0x00002aaaab2c6579 llvm::DwarfDebug::emitDIE(llvm::DIE*, std::vector<llvm::DIEAbbrev*, std::allocator<llvm::DIEAbbrev*> >*) + 1001
8 libLLVM-3.4.so.1 0x00002aaaab2c6579 llvm::DwarfDebug::emitDIE(llvm::DIE*, std::vector<llvm::DIEAbbrev*, std::allocator<llvm::DIEAbbrev*> >*) + 1001
9 libLLVM-3.4.so.1 0x00002aaaab2c6579 llvm::DwarfDebug::emitDIE(llvm::DIE*, std::vector<llvm::DIEAbbrev*, std::allocator<llvm::DIEAbbrev*> >*) + 1001
10 libLLVM-3.4.so.1 0x00002aaaab2c6a26 llvm::DwarfUnits::emitUnits(llvm::DwarfDebug*, llvm::MCSection const*, llvm::MCSection const*, llvm::MCSymbol const*) + 518
11 libLLVM-3.4.so.1 0x00002aaaab2cffe2 llvm::DwarfDebug::endModule() + 546
12 libLLVM-3.4.so.1 0x00002aaaab2af010 llvm::AsmPrinter::doFinalization(llvm::Module&) + 496
13 libLLVM-3.4.so.1 0x00002aaaab54ec85 llvm::FPPassManager::doFinalization(llvm::Module&) + 69
14 libLLVM-3.4.so.1 0x00002aaaab555475 llvm::MPPassManager::runOnModule(llvm::Module&) + 613
15 libLLVM-3.4.so.1 0x00002aaaab55757c llvm::PassManagerImpl::run(llvm::Module&) + 172
16 clang 0x000000000078fedc clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::Module*, clang::BackendAction, llvm::raw_ostream*) + 2220
17 clang 0x000000000078de97
18 clang 0x00000000008e0edb clang::ParseAST(clang::Sema&, bool, bool) + 507
19 clang 0x0000000000645699 clang::FrontendAction::Execute() + 169
20 clang 0x0000000000626ca2 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 290
21 clang 0x0000000000612907 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1607
22 clang 0x000000000060dcb8 cc1_main(char const**, char const**, char const*, void*) + 1224
23 clang 0x000000000060c6be main + 7822
24 libc.so.6 0x00002aaaacae4ea5 __libc_start_main + 245
25 clang 0x000000000060ccb5
Stack dump:
0. Program arguments: /usr/bin/clang -cc1 -triple x86_64-pc-linux-gnu -emit-obj -disable-free -disable-llvm-verifier -main-file-name test_surfaceloop.cpp -mrelocation-model pic -pic-level 2 -relaxed-aliasing -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64 -target-linker-version 2.23.52.20130620 -momit-leaf-frame-pointer -g -coverage-file /home/chris/Canonical/Mir/mir/build/tests/integration-tests/CMakeFiles/integration-tests.dir/test_surfaceloop.cpp.o -resource-dir /usr/bin/../lib/clang/3.4 -include /home/chris/Canonical/Mir/mir/udev-wrapper/3rd_party/android-input/android/system/core/include/arch/ubuntu-x86/AndroidConfig.h -D ANDROID_USE_STD -D __GBM__ -D NDEBUG -D USING_STD_CPP11 -I /home/chris/Canonical/Mir/mir/udev-wrapper/include/shared -I /home/chris/Canonical/Mir/mir/udev-wrapper/3rd_party/libancillary -I /home/chris/Canonical/Mir/mir/udev-wrapper/3rd_party/android-deps -I /home/chris/Canonical/Mir/mir/udev-wrapper/3rd_party/android-input/android/frameworks/base/services/input -I /home/chris/Canonical/Mir/mir/udev-wrapper/3rd_party/android-input/android/frameworks/base/include -I /home/chris/Canonical/Mir/mir/udev-wrapper/3rd_party/android-input/android/frameworks/native/include -I /home/chris/Canonical/Mir/mir/udev-wrapper/3rd_party/android-input/android/hardware/libhardware_legacy/include -I /home/chris/Canonical/Mir/mir/udev-wrapper/3rd_party/android-input/android/system/core/include -I /home/chris/Canonical/Mir/mir/udev-wrapper/3rd_party/android-input/android/system/extras/ext4_utils -I /home/chris/Canonical/Mir/mir/udev-wrapper/3rd_party/android-input/android/external/kernel-headers/original -I /home/chris/Canonical/Mir/mir/build/src/shared/protobuf -I /home/chris/Canonical/Mir/mir/udev-wrapper/3rd_party/gmock/include -I /home/chris/Canonical/Mir/mir/udev-wrapper/3rd_party/gmock/gtest/include -I /home/chris/Canonical/Mir/mir/udev-wrapper/include/server -I /home/chris/Canonical/Mir/mir/udev-wrapper/include/client -I /home/chris/Canonical/Mir/mir/udev-wrapper/include/test -I /home/chris/Canonical/Mir/mir/udev-wrapper -I /usr/include/libdrm -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8 -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/x86_64-linux-gnu -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/backward -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/x86_64-linux-gnu/c++/4.8 -internal-isystem /usr/local/include -internal-isystem /usr/bin/../lib/clang/3.4/include -internal-isystem /usr/include/clang/3.4/include/ -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /usr/include -O2 -Werror -Wall -Wnon-virtual-dtor -Wextra -Wno-return-type-c-linkage -Wno-error=null-dereference -Wno-error=overloaded-virtual -pedantic -std=c++0x -fdeprecated-macro -fdebug-compilation-dir /home/chris/Canonical/Mir/mir/build/tests/integration-tests -ferror-limit 19 -fmessage-length 170 -mstackrealign -fobjc-runtime=gcc -fobjc-default-synthesize-properties -fcxx-exceptions -fexceptions -fdiagnostics-show-option -fcolor-diagnostics -backend-option -vectorize-loops -o CMakeFiles/integration-tests.dir/test_surfaceloop.cpp.o -x c++ /home/chris/Canonical/Mir/mir/udev-wrapper/tests/integration-tests/test_surfaceloop.cpp
1. <eof> parser at end of file
2. Code generation
clang: error: unable to execute command: Segmentation fault (core dumped)
clang: error: clang frontend command failed due to signal (use -v to see invocation)
Ubuntu clang version 3.4-1 (trunk) (based on LLVM 3.4)
Target: x86_64-pc-linux-gnu
Thread model: posix
clang: note: diagnostic msg: PLEASE submit a bug report to http://bugs.debian.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/test_surfaceloop-uLqs4n.cpp
clang: note: diagnostic msg: /tmp/test_surfaceloop-uLqs4n.sh
clang: note: diagnostic msg:

********************

ProblemType: Crash
DistroRelease: Ubuntu 13.10
Package: clang-3.4 1:3.4~svn183914-1
ProcVersionSignature: Ubuntu 3.10.0-2.9-generic 3.10.0
Uname: Linux 3.10.0-2-generic x86_64
ApportVersion: 2.10.2-0ubuntu3
Architecture: amd64
Date: Fri Jul 5 16:30:44 2013
EcryptfsInUse: Yes
ExecutablePath: /usr/bin/clang
InstallationDate: Installed on 2013-05-06 (59 days ago)
InstallationMedia: Ubuntu 13.04 "Raring Ringtail" - Release amd64 (20130423.1)
MarkForUpload: True
SegvAnalysis:
 Segfault happened at: 0x2aaaab2b4d6a <_ZNK4llvm8DIEEntry9EmitValueEPNS_10AsmPrinterEj+10>: mov 0x8(%rdx),%esi
 PC (0x2aaaab2b4d6a) ok
 source "0x8(%rdx)" (0x00000008) not located in a known VMA region (needed readable region)!
 destination "%esi" ok
SegvReason: reading NULL VMA
Signal: 11
SourcePackage: llvm-toolchain-snapshot
StacktraceTop:
 llvm::DIEEntry::EmitValue(llvm::AsmPrinter*, unsigned int) const () from /usr/lib/x86_64-linux-gnu/libLLVM-3.4.so.1
 llvm::DwarfDebug::emitDIE(llvm::DIE*, std::vector<llvm::DIEAbbrev*, std::allocator<llvm::DIEAbbrev*> >*) () from /usr/lib/x86_64-linux-gnu/libLLVM-3.4.so.1
 llvm::DwarfDebug::emitDIE(llvm::DIE*, std::vector<llvm::DIEAbbrev*, std::allocator<llvm::DIEAbbrev*> >*) () from /usr/lib/x86_64-linux-gnu/libLLVM-3.4.so.1
 llvm::DwarfDebug::emitDIE(llvm::DIE*, std::vector<llvm::DIEAbbrev*, std::allocator<llvm::DIEAbbrev*> >*) () from /usr/lib/x86_64-linux-gnu/libLLVM-3.4.so.1
 llvm::DwarfDebug::emitDIE(llvm::DIE*, std::vector<llvm::DIEAbbrev*, std::allocator<llvm::DIEAbbrev*> >*) () from /usr/lib/x86_64-linux-gnu/libLLVM-3.4.so.1
Title: clang crashed with SIGSEGV in llvm::DIEEntry::EmitValue()
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip lpadmin plugdev sambashare sbuild sudo

Revision history for this message
Chris Halse Rogers (raof) wrote :
Revision history for this message
Chris Halse Rogers (raof) wrote :
Revision history for this message
Apport retracing service (apport) wrote :

StacktraceTop:
 ?? ()
 ?? ()
 ?? ()
 ?? ()
 ?? ()

Revision history for this message
Apport retracing service (apport) wrote : Stacktrace.txt
Revision history for this message
Apport retracing service (apport) wrote : ThreadStacktrace.txt
tags: added: apport-failed-retrace
tags: removed: need-amd64-retrace
Revision history for this message
Chris Halse Rogers (raof) wrote :
information type: Private → Public
Revision history for this message
Matthias Klose (doko) wrote :

closing for the snapshot package. please reopen and reassign to the 3.4 and/or 3.5 packages if appropriate.

Changed in llvm-toolchain-snapshot (Ubuntu):
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.