[LLVMbugs] [Bug 10325] New: clang++ craches when compiling certain code

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun Jul 10 14:47:20 PDT 2011


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

           Summary: clang++ craches when compiling certain code
           Product: clang
           Version: trunk
          Platform: Macintosh
        OS/Version: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: llvm at niebuhrt.de
                CC: llvmbugs at cs.uiuc.edu


Created an attachment (id=6868)
 --> (http://llvm.org/bugs/attachment.cgi?id=6868)
ucFiber.cpp

the attached code was compiled with libc++
clang++ -c ucFiber.cpp -std=c++0x -U__STRICT_ANSI__ -stdlib=libc++

It used to compile an run with previous revisions.
The revision that resulted in this error must be between Jul 5 and Jul 10.


clang++ -c ucFiber.cpp -std=c++0x -U__STRICT_ANSI__ -stdlib=libc++
Assertion failed: ((i >= FTy->getNumParams() || FTy->getParamType(i) ==
Params[i]->getType()) && "Calling a function with a bad signature!"), function
init, file Instructions.cpp, line 191.
0  clang             0x00000001018f4602 PrintStackTrace(void*) + 34
1  clang             0x00000001018f5583 SignalHandler(int) + 707
2  libSystem.B.dylib 0x00007fff877951ba _sigtramp + 26
3  libSystem.B.dylib 0x00007fff5fbf99a0 _sigtramp + 3628484608
4  clang             0x00000001018f4a82 __assert_rtn + 66
5  clang             0x0000000101803a64 llvm::CallInst::init(llvm::Value*,
llvm::Value* const*, unsigned int) + 292
6  clang             0x0000000101652c84
llvm::CallInst::CallInst<llvm::Value**>(llvm::Value*, llvm::Value**,
llvm::Value**, llvm::Twine const&, llvm::Instruction*) + 164
7  clang             0x00000001001ae366
clang::CodeGen::CodeGenFunction::EmitCall(clang::CodeGen::CGFunctionInfo
const&, llvm::Value*, clang::CodeGen::ReturnValueSlot,
clang::CodeGen::CallArgList const&, clang::Decl const*, llvm::Instruction**) +
5286
8  clang             0x00000001001f04e7
clang::CodeGen::CodeGenFunction::EmitCall(clang::QualType, llvm::Value*,
clang::CodeGen::ReturnValueSlot, clang::ConstExprIterator,
clang::ConstExprIterator, clang::Decl const*) + 519
9  clang             0x00000001001fb8cb
clang::CodeGen::CodeGenFunction::EmitCallExpr(clang::CallExpr const*,
clang::CodeGen::ReturnValueSlot) + 1003
10 clang             0x0000000100226582 (anonymous
namespace)::ScalarExprEmitter::VisitCallExpr(clang::CallExpr const*) + 82
11 clang             0x00000001002311eb clang::StmtVisitorBase<clang::make_ptr,
(anonymous namespace)::ScalarExprEmitter, llvm::Value*>::Visit(clang::Stmt*) +
3947
12 clang             0x000000010023227d
clang::CodeGen::CodeGenFunction::EmitScalarExpr(clang::Expr const*, bool) + 141
13 clang             0x00000001001f27e0
clang::CodeGen::CodeGenFunction::EmitAnyExpr(clang::Expr const*,
clang::CodeGen::AggValueSlot, bool) + 80
14 clang             0x00000001002001b5
clang::CodeGen::CodeGenFunction::EmitIgnoredExpr(clang::Expr const*) + 53
15 clang             0x00000001002a48fc
clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt const*) + 1356
16 clang             0x00000001002a78bb
clang::CodeGen::CodeGenFunction::EmitCompoundStmt(clang::CompoundStmt const&,
bool, clang::CodeGen::AggValueSlot) + 283
17 clang             0x00000001002a7c89
clang::CodeGen::CodeGenFunction::EmitSimpleStmt(clang::Stmt const*) + 505
18 clang             0x00000001002a43e0
clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt const*) + 48
19 clang             0x00000001002a75c1
clang::CodeGen::CodeGenFunction::EmitIfStmt(clang::IfStmt const&) + 529
20 clang             0x00000001002a47dd
clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt const*) + 1069
21 clang             0x00000001002a78bb
clang::CodeGen::CodeGenFunction::EmitCompoundStmt(clang::CompoundStmt const&,
bool, clang::CodeGen::AggValueSlot) + 283
22 clang             0x00000001002a7c89
clang::CodeGen::CodeGenFunction::EmitSimpleStmt(clang::Stmt const*) + 505
23 clang             0x00000001002a43e0
clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt const*) + 48
24 clang             0x00000001001bbbb2
clang::CodeGen::CodeGenFunction::EmitConstructorBody(clang::CodeGen::FunctionArgList&)
+ 210
25 clang             0x00000001002d09b6
clang::CodeGen::CodeGenFunction::GenerateCode(clang::GlobalDecl,
llvm::Function*, clang::CodeGen::CGFunctionInfo const&) + 646
26 clang             0x00000001001a16ee
clang::CodeGen::CodeGenModule::EmitCXXConstructor(clang::CXXConstructorDecl
const*, clang::CXXCtorType) + 270
27 clang             0x00000001002dbe2f
clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::GlobalDecl) + 287
28 clang             0x00000001002dc00a
clang::CodeGen::CodeGenModule::EmitGlobal(clang::GlobalDecl) + 154
29 clang             0x00000001002dd029
clang::CodeGen::CodeGenModule::EmitTopLevelDecl(clang::Decl*) + 1129
30 clang             0x00000001002dce9b
clang::CodeGen::CodeGenModule::EmitTopLevelDecl(clang::Decl*) + 731
31 clang             0x00000001002dce9b
clang::CodeGen::CodeGenModule::EmitTopLevelDecl(clang::Decl*) + 731
32 clang             0x00000001002ef80f (anonymous
namespace)::CodeGeneratorImpl::HandleTopLevelDecl(clang::DeclGroupRef) + 63
33 clang             0x00000001002cbefb
clang::BackendConsumer::HandleTopLevelDecl(clang::DeclGroupRef) + 155
34 clang             0x00000001002fd4a2 clang::ParseAST(clang::Sema&, bool) +
338
35 clang             0x00000001002ca3dc clang::CodeGenAction::ExecuteAction() +
60
36 clang             0x000000010002bd01
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 433
37 clang             0x000000010000ac4b
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1547
38 clang             0x000000010000154c cc1_main(char const**, char const**,
char const*, void*) + 652
39 clang             0x0000000100009a6e main + 4526
40 clang             0x0000000100000934 start + 52
41 clang             0x000000000000002b start + 4294965035
Stack dump:
0.    Program arguments: /Users/niebuhr/projects/llvm/Release+Asserts/bin/clang
-cc1 -triple x86_64-apple-macosx10.6.8 -emit-obj -mrelax-all -disable-free
-main-file-name ucFiber.cpp -pic-level 1 -mdisable-fp-elim -masm-verbose
-munwind-tables -target-cpu core2 -target-linker-version 123.2 -coverage-file
ucFiber.o -resource-dir
/Users/niebuhr/projects/llvm/Release+Asserts/bin/../lib/clang/3.0 -U
__STRICT_ANSI__ -stdlib=libc++ -std=c++0x -fdeprecated-macro -ferror-limit 19
-fmessage-length 151 -stack-protector 1 -fblocks -fcxx-exceptions -fexceptions
-fdiagnostics-show-option -fcolor-diagnostics -o ucFiber.o -x c++ ucFiber.cpp 
1.    <eof> parser at end of file
2.    ../odemx-http.git/src/coroutine/ucFiber.cpp:34:11: LLVM IR generation of
declaration 'odemx'
3.    ../odemx-http.git/src/coroutine/ucFiber.cpp:48:10: Generating code for
declaration 'odemx::coroutine::ucFiber::ucFiber'
4.    ../odemx-http.git/src/coroutine/ucFiber.cpp:52:1: LLVM IR generation of
compound statement ('{}')
5.    ../odemx-http.git/src/coroutine/ucFiber.cpp:61:27: LLVM IR generation of
compound statement ('{}')
clang: error: unable to execute command: Illegal instruction
clang: error: clang frontend command failed due to signal 2 (use -v to see
invocation)

-- 
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