[LLVMbugs] [Bug 6628] New: Assertion failed: Calling a function with bad signature!
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Tue Mar 16 08:38:39 PDT 2010
http://llvm.org/bugs/show_bug.cgi?id=6628
Summary: Assertion failed: Calling a function with bad
signature!
Product: clang
Version: trunk
Platform: Macintosh
OS/Version: MacOS X
Status: NEW
Severity: normal
Priority: P
Component: C++
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: Fons.Rademakers at cern.ch
CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com
Created an attachment (id=4530)
--> (http://llvm.org/bugs/attachment.cgi?id=4530)
Source file exhibiting the problem
Compiling the attached file with clang++ -c aap.cxx gives:
(proof) [577] clang++ -c aap.cxx
Assertion failed: ((NumParams == FTy->getNumParams() || (FTy->isVarArg() &&
NumParams > FTy->getNumParams())) && "Calling a function with bad signature!"),
function init, file /Users/rdm/llvm/src/lib/VMCore/Instructions.cpp, line 307.
0 clang 0x0000000100d5b628 PrintStackTrace(void*) + 38
1 clang 0x0000000100d5bbb6 SignalHandler(int) + 336
2 libSystem.B.dylib 0x00007fff88a66eaa _sigtramp + 26
3 clang 0x00000001001efcf7 (anonymous
namespace)::OldVtableBuilder::GenerateVtableForBase(clang::CXXRecordDecl
const*, long long, bool, bool, bool, bool, int,
std::vector<std::pair<clang::CXXRecordDecl const*, long long>,
std::allocator<std::pair<clang::CXXRecordDecl const*, long long> > >*) + 569
4 libSystem.B.dylib 0x00007fff88ae2e74 __pthread_markcancel + 0
5 clang 0x0000000100c8a45c llvm::CallInst::init(llvm::Value*,
llvm::Value* const*, unsigned int) + 246
6 clang 0x0000000100679a1e void
llvm::CallInst::init<llvm::Value**>(llvm::Value*, llvm::Value**, llvm::Value**,
llvm::Twine const&, std::random_access_iterator_tag) + 88
7 clang 0x000000010067a0d5
llvm::CallInst::CallInst<llvm::Value**>(llvm::Value*, llvm::Value**,
llvm::Value**, llvm::Twine const&, llvm::Instruction*) + 271
8 clang 0x000000010067a148 llvm::CallInst*
llvm::CallInst::Create<llvm::Value**>(llvm::Value*, llvm::Value**,
llvm::Value**, llvm::Twine const&, llvm::Instruction*) + 106
9 clang 0x0000000100154fa1 llvm::CallInst* llvm::IRBuilder<true,
llvm::ConstantFolder, llvm::IRBuilderDefaultInserter<true>
>::CreateCall<llvm::Value**>(llvm::Value*, llvm::Value**, llvm::Value**,
llvm::Twine const&) + 71
10 clang 0x00000001001511ba
clang::CodeGen::CodeGenFunction::EmitCall(clang::CodeGen::CGFunctionInfo
const&, llvm::Value*, clang::CodeGen::ReturnValueSlot,
llvm::SmallVector<std::pair<clang::CodeGen::RValue, clang::QualType>, 16u>
const&, clang::Decl const*) + 2722
11 clang 0x000000010015b4c8
clang::CodeGen::CodeGenFunction::EmitClassMemberwiseCopy(llvm::Value*,
llvm::Value*, clang::CXXRecordDecl const*, clang::CXXRecordDecl const*,
clang::QualType) + 988
12 clang 0x000000010015b70c
clang::CodeGen::CodeGenFunction::SynthesizeCXXCopyConstructor(llvm::SmallVector<std::pair<clang::VarDecl
const*, clang::QualType>, 16u> const&) + 534
13 clang 0x000000010015be6b
clang::CodeGen::CodeGenFunction::EmitConstructorBody(llvm::SmallVector<std::pair<clang::VarDecl
const*, clang::QualType>, 16u>&) + 507
14 clang 0x00000001002060dd
clang::CodeGen::CodeGenFunction::GenerateCode(clang::CodeGen::GlobalDecl,
llvm::Function*) + 1455
15 clang 0x000000010014d99c
clang::CodeGen::CodeGenModule::EmitCXXConstructor(clang::CXXConstructorDecl
const*, clang::CXXCtorType) + 316
16 clang 0x000000010020ee26
clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::CodeGen::GlobalDecl)
+ 460
17 clang 0x000000010020f83b
clang::CodeGen::CodeGenModule::EmitDeferred() + 289
18 clang 0x000000010020fa41
clang::CodeGen::CodeGenModule::Release() + 21
19 clang 0x0000000100228ce5 (anonymous
namespace)::CodeGeneratorImpl::HandleTranslationUnit(clang::ASTContext&) + 91
20 clang 0x000000010003b325 (anonymous
namespace)::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) + 97
21 clang 0x0000000100235de4 clang::ParseAST(clang::Preprocessor&,
clang::ASTConsumer*, clang::ASTContext&, bool, bool,
clang::CodeCompleteConsumer*) + 776
22 clang 0x000000010005a7f8
clang::ASTFrontendAction::ExecuteAction() + 256
23 clang 0x000000010005a8e8 clang::FrontendAction::Execute() + 226
24 clang 0x000000010003e488
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 726
25 clang 0x000000010001e980 cc1_main(char const**, char const**,
char const*, void*) + 1296
26 clang 0x0000000100022719 main + 252
27 clang 0x000000010001d958 start + 52
28 clang 0x000000000000001d start + 4294846201
Stack dump:
0. Program arguments: /Users/rdm/llvm/inst/bin/clang -cc1 -triple
x86_64-apple-darwin10.0.0 -S -disable-free -main-file-name aap.cxx -pic-level 1
-mdisable-fp-elim -munwind-tables -target-cpu core2 -resource-dir
/Users/rdm/llvm/inst/lib/clang/1.1 -fmessage-length 80 -stack-protector 1
-fblocks -fexceptions -fdiagnostics-show-option -fcolor-diagnostics -o
/var/folders/zK/zKJDfZztH5upJbZEL05q7U+++TI/-Tmp-/cc-Ym8obY.s -x c++ aap.cxx
1. <eof> parser at end of file
2. Per-file LLVM IR generation
3. include/TObjectSet.h:27:7: Generating code for declaration
'TObjectSet::TObjectSet'
clang: error: compiler command failed due to signal 6 (use -v to see
invocation)
With g++ all is fine.
Cheers, Fons.
--
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