[LLVMbugs] [Bug 11547] New: Clang crash compiling newlib

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Dec 12 15:42:38 PST 2011


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

             Bug #: 11547
           Summary: Clang crash compiling newlib
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: jpbonn-keyword-llvmbug.a51747 at corniceresearch.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


Created attachment 7716
  --> http://llvm.org/bugs/attachment.cgi?id=7716
File causing crash

clang version 3.1 (git at github.com:milkymist/clang-lm32.git
http://llvm.org/git/clang.git 84db6ffdf895b7b31fae6d6ba0fd37b2f9a387ed)
Target: x86_64-unknown-linux-gnu
Thread model: posix

$ clang -S -emit-llvm -o /tmp/ce.ll /tmp/ce.c
0  clang           0x0000000002cd5a85
1  clang           0x0000000002cd5881
2  libpthread.so.0 0x00007fbbbf248c60
3  clang           0x00000000014a577c llvm::Value::getType() const + 12
4  clang           0x00000000014cab62
llvm::SelectInst::SelectInst(llvm::Value*, llvm::Value*, llvm::Value*,
llvm::Twine const&, llvm::Instruction*) + 60
5  clang           0x00000000014cac1e llvm::SelectInst::Create(llvm::Value*,
llvm::Value*, llvm::Value*, llvm::Twine const&, llvm::Instruction*) + 84
6  clang           0x00000000014cc9bc llvm::IRBuilder<true,
llvm::ConstantFolder, llvm::IRBuilderDefaultInserter<true>
>::CreateSelect(llvm::Value*, llvm::Value*, llvm::Value*, llvm::Twine const&) +
198
7  clang           0x0000000001573b66
8  clang           0x00000000015760c5
9  clang           0x00000000015753d8
10 clang           0x0000000001567d19
11 clang           0x0000000001567d9c
12 clang           0x0000000001575b81
13 clang           0x0000000001567d19
14 clang           0x00000000015744b0
clang::CodeGen::CodeGenFunction::EmitScalarExpr(clang::Expr const*, bool) + 156
15 clang           0x000000000152eb07
clang::CodeGen::CodeGenFunction::EmitAnyExpr(clang::Expr const*,
clang::CodeGen::AggValueSlot, bool) + 83
16 clang           0x000000000152ea7b
clang::CodeGen::CodeGenFunction::EmitIgnoredExpr(clang::Expr const*) + 97
17 clang           0x00000000015c6f9b
clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt const*) + 401
18 clang           0x00000000015c7574
clang::CodeGen::CodeGenFunction::EmitCompoundStmt(clang::CompoundStmt const&,
bool, clang::CodeGen::AggValueSlot) + 292
19 clang           0x00000000015c733b
clang::CodeGen::CodeGenFunction::EmitSimpleStmt(clang::Stmt const*) + 217
20 clang           0x00000000015c6e55
clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt const*) + 75
21 clang           0x00000000015ddf20
clang::CodeGen::CodeGenFunction::EmitFunctionBody(clang::CodeGen::FunctionArgList&)
+ 154
22 clang           0x00000000015de393
clang::CodeGen::CodeGenFunction::GenerateCode(clang::GlobalDecl,
llvm::Function*, clang::CodeGen::CGFunctionInfo const&) + 819
23 clang           0x00000000014813ef
clang::CodeGen::CodeGenModule::EmitGlobalFunctionDefinition(clang::GlobalDecl)
+ 917
24 clang           0x000000000147f054
clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::GlobalDecl) + 448
25 clang           0x000000000147eaec
clang::CodeGen::CodeGenModule::EmitGlobal(clang::GlobalDecl) + 834
26 clang           0x0000000001484330
clang::CodeGen::CodeGenModule::EmitTopLevelDecl(clang::Decl*) + 310
27 clang           0x00000000014789bf
28 clang           0x000000000147743a
clang::BackendConsumer::HandleTopLevelDecl(clang::DeclGroupRef) + 158
29 clang           0x0000000001601004 clang::ParseAST(clang::Sema&, bool) + 440
30 clang           0x000000000130170f clang::ASTFrontendAction::ExecuteAction()
+ 265
31 clang           0x00000000014769f5 clang::CodeGenAction::ExecuteAction() +
957
32 clang           0x0000000001301369 clang::FrontendAction::Execute() + 325
33 clang           0x00000000012dc67a
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 740
34 clang           0x00000000012aeab5
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 969
35 clang           0x000000000129e0e7 cc1_main(char const**, char const**, char
const*, void*) + 990
36 clang           0x00000000012aa078 main + 496
37 libc.so.6       0x00007fbbbe51eeff __libc_start_main + 255
38 clang           0x000000000129d399
Stack dump:
0.    Program arguments: /var/build/Debug+Asserts/bin/clang -cc1 -triple
x86_64-unknown-linux-gnu -emit-llvm -disable-free -main-file-name ce.c
-mrelocation-model static -mdisable-fp-elim -masm-verbose -mconstructor-aliases
-munwind-tables -target-cpu x86-64 -target-linker-version 2.21.0.20110327
-momit-leaf-frame-pointer -coverage-file /tmp/ce.ll -resource-dir
/var/build/Debug+Asserts/bin/../lib/clang/3.1 -fmodule-cache-path
/var/tmp/clang-module-cache -internal-isystem /usr/local/include
-internal-isystem /var/build/Debug+Asserts/bin/../lib/clang/3.1/include
-internal-externc-isystem /usr/include/x86_64-linux-gnu
-internal-externc-isystem /include -internal-externc-isystem /usr/include
-fdebug-compilation-dir
/home/jpbonn/Documents/mico32/newlib/build/lm32-rtems4.11/newlib/libc/stdio
-ferror-limit 19 -fmessage-length 82 -mstackrealign -fgnu-runtime
-fobjc-runtime-has-arc -fobjc-runtime-has-weak -fobjc-fragile-abi
-fdiagnostics-show-option -fcolor-diagnostics -o /tmp/ce.ll -x c /tmp/ce.c 
1.    <eof> parser at end of file
2.    ../../../../../newlib-1.19.0/newlib/libc/stdio/clearerr.c:64:1: LLVM IR
generation of declaration 'clearerr'
3.    ../../../../../newlib-1.19.0/newlib/libc/stdio/clearerr.c:64:1:
Generating code for declaration 'clearerr'
4.    ../../../../../newlib-1.19.0/newlib/libc/stdio/clearerr.c:66:1: LLVM IR
generation of compound statement ('{}')
clang: error: unable to execute command: Segmentation fault
clang: error: clang frontend command failed due to signal (use -v to see
invocation)
clang: note: diagnostic msg: Please submit a bug report to
http://llvm.org/bugs/ and include command line arguments and all diagnostic
information.
clang: note: diagnostic msg: Preprocessed source(s) and associated run
script(s) are located at:
clang: note: diagnostic msg: /tmp/ce-wihH4b.i
clang: note: diagnostic msg: /tmp/ce-wihH4b.sh


"/var/build/Debug+Asserts/bin/clang" -cc1 -triple x86_64-unknown-linux-gnu
-emit-llvm -disable-free -main-file-name ce.c -mrelocation-model static
-mdisable-fp-elim -masm-verbose -mconstructor-aliases -munwind-tables
-target-cpu x86-64 -target-linker-version 2.21.0.20110327
-momit-leaf-frame-pointer -coverage-file /tmp/ce.ll -resource-dir
/var/build/Debug+Asserts/bin/../lib/clang/3.1 -fmodule-cache-path
/var/tmp/clang-module-cache -internal-isystem /usr/local/include
-internal-isystem /var/build/Debug+Asserts/bin/../lib/clang/3.1/include
-internal-externc-isystem /usr/include/x86_64-linux-gnu
-internal-externc-isystem /include -internal-externc-isystem /usr/include
-fdebug-compilation-dir
/home/jpbonn/Documents/mico32/newlib/build/lm32-rtems4.11/newlib/libc/stdio
-ferror-limit 19 -fmessage-length 82 -mstackrealign -fgnu-runtime
-fobjc-runtime-has-arc -fobjc-runtime-has-weak -fobjc-fragile-abi
-fdiagnostics-show-option -fcolor-diagnostics -o /tmp/ce.ll -x c /tmp/ce.c

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list