[LLVMbugs] [Bug 22114] New: segfault generating debug symbols

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Jan 7 01:26:44 PST 2015


http://llvm.org/bugs/show_bug.cgi?id=22114

            Bug ID: 22114
           Summary: segfault generating debug symbols
           Product: clang
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: f.sowade at r9e.de
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 13645
  --> http://llvm.org/bugs/attachment.cgi?id=13645&action=edit
Code crashing clang

The attached code segfaults clang when built using the current debian nightly
builds:

$ clang++-3.6 -g -c -std=c++11 final.cpp
0  libLLVM-3.6.so.1 0x00007f9367a25152 llvm::sys::PrintStackTrace(_IO_FILE*) +
34
1  libLLVM-3.6.so.1 0x00007f9367a238a1
2  libpthread.so.0  0x00007f93661258d0
3  libLLVM-3.6.so.1 0x00007f9366e02a75 llvm::DwarfUnit::addString(llvm::DIE&,
llvm::dwarf::Attribute, llvm::StringRef) + 21
4  libLLVM-3.6.so.1 0x00007f9366de1ead
llvm::DwarfCompileUnit::applyVariableAttributes(llvm::DbgVariable const&,
llvm::DIE&) + 189
5  libLLVM-3.6.so.1 0x00007f9366dec31e
llvm::DwarfDebug::finishVariableDefinitions() + 302
6  libLLVM-3.6.so.1 0x00007f9366df0c26 llvm::DwarfDebug::finalizeModuleInfo() +
38
7  libLLVM-3.6.so.1 0x00007f9366dfd366 llvm::DwarfDebug::endModule() + 38
8  libLLVM-3.6.so.1 0x00007f9366dd2077
llvm::AsmPrinter::doFinalization(llvm::Module&) + 567
9  libLLVM-3.6.so.1 0x00007f9366c09599
llvm::FPPassManager::doFinalization(llvm::Module&) + 73
10 libLLVM-3.6.so.1 0x00007f9366c14575
llvm::legacy::PassManagerImpl::run(llvm::Module&) + 789
11 clang            0x000000000089272a
clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::CodeGenOptions
const&, clang::TargetOptions const&, clang::LangOptions const&,
llvm::StringRef, llvm::Module*, clang::BackendAction, llvm::raw_ostream*) +
3178
12 clang            0x0000000000880fd0
13 clang            0x0000000000a4abb5 clang::ParseAST(clang::Sema&, bool,
bool) + 741
14 clang            0x00000000006ed416 clang::FrontendAction::Execute() + 118
15 clang            0x00000000006ca641
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 289
16 clang            0x00000000006b3363
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1827
17 clang            0x00000000006ad998 cc1_main(llvm::ArrayRef<char const*>,
char const*, void*) + 1256
18 clang            0x00000000006acfc6 main + 9910
19 libc.so.6        0x00007f9364cfdb45 __libc_start_main + 245
20 clang            0x00000000006ad035
Stack dump:
0.      Program arguments: /usr/lib/llvm-3.6/bin/clang -cc1 -triple
x86_64-pc-linux-gnu -emit-obj -mrelax-all -disable-free -disable-llvm-verifier
-main-file-name final.cpp -mrelocation-model static -mthread-model posix
-mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases
-munwind-tables -fuse-init-array -target-cpu x86-64 -target-linker-version 2.25
-g -dwarf-column-info -coverage-file /crosscan/src/reduce/final.cpp
-resource-dir /usr/lib/llvm-3.6/bin/../lib/clang/3.6.0 -internal-isystem
/usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9
-internal-isystem
/usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/x86_64-linux-gnu/c++/4.9
-internal-isystem
/usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/x86_64-linux-gnu/c++/4.9
-internal-isystem
/usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/backward
-internal-isystem /usr/local/include -internal-isystem
/usr/lib/llvm-3.6/bin/../lib/clang/3.6.0/include -internal-externc-isystem
/usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/include -internal-externc-isystem
/usr/include/x86_64-linux-gnu -internal-externc-isystem /include
-internal-externc-isystem /usr/include -std=c++11 -fdeprecated-macro
-fdebug-compilation-dir /crosscan/src/reduce -ferror-limit 19 -fmessage-length
278 -mstackrealign -fobjc-runtime=gcc -fcxx-exceptions -fexceptions
-fdiagnostics-show-option -fcolor-diagnostics -o final.o -x c++ final.cpp
1.      <eof> parser at end of file
2.      Code generation
clang: error: unable to execute command: Segmentation fault
clang: error: clang frontend command failed due to signal (use -v to see
invocation)
Debian clang version 3.6.0-svn225298-1~exp1 (trunk) (based on LLVM 3.6.0)
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/final-88639e.cpp
clang: note: diagnostic msg: /tmp/final-88639e.sh
clang: note: diagnostic msg:

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

$ clang++-3.6 --version
Debian clang version 3.6.0-svn225298-1~exp1 (trunk) (based on LLVM 3.6.0)
Target: x86_64-pc-linux-gnu
Thread model: posix

compiling the same code without -g works:

$ clang++-3.6 -c -std=c++11 final.cpp
$

-- 
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/20150107/1d6ef0bd/attachment.html>


More information about the llvm-bugs mailing list