[LLVMbugs] [Bug 7046] New: crash without assert in boost code
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Tue May 4 14:58:02 PDT 2010
http://llvm.org/bugs/show_bug.cgi?id=7046
Summary: crash without assert in boost code
Product: clang
Version: trunk
Platform: PC
OS/Version: All
Status: NEW
Severity: normal
Priority: P
Component: C++
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: chris at bubblescope.net
CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com
Created an attachment (id=4822)
--> (http://llvm.org/bugs/attachment.cgi?id=4822)
crashing testcase
The attached test case, which is valid code (according to g++) crashes without
an assert.
/Users/caj/Dropbox/crash_without_assert.cpp:31:1: warning: control reaches end
of non-void function [-Wreturn-type]
}
^
/Users/caj/Dropbox/crash_without_assert.cpp:15:3: warning: control reaches end
of non-void function [-Wreturn-type]
}
^
/Users/caj/Dropbox/crash_without_assert.cpp:24:8: note: in instantiation of
member function 'hash_function<1>::op' requested here
m->op( 0 );
^
0 clang 0x00f542d5 PrintStackTrace(void*) + 45
1 clang 0x00f5481f SignalHandler(int) + 374
2 libSystem.B.dylib 0x91cc842b _sigtramp + 43
3 libSystem.B.dylib 0xffffffff _sigtramp + 1848867839
4 clang 0x0055c851 clang::CallExpr::getCallReturnType() const +
147
5 clang 0x001a160b (anonymous
namespace)::ScalarExprEmitter::VisitCallExpr(clang::CallExpr const*) + 23
6 clang 0x001a722d clang::StmtVisitor<(anonymous
namespace)::ScalarExprEmitter, llvm::Value*>::Visit(clang::Stmt*) + 2747
7 clang 0x001a77ba
clang::CodeGen::CodeGenFunction::EmitScalarExpr(clang::Expr const*, bool) + 142
8 clang 0x00185cec
clang::CodeGen::CodeGenFunction::EmitAnyExpr(clang::Expr const*, llvm::Value*,
bool, bool, bool) + 76
9 clang 0x001eae60
clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt const*) + 488
10 clang 0x001ec751
clang::CodeGen::CodeGenFunction::EmitCompoundStmt(clang::CompoundStmt const&,
bool, llvm::Value*, bool) + 253
11 clang 0x001ec93a
clang::CodeGen::CodeGenFunction::EmitSimpleStmt(clang::Stmt const*) + 182
12 clang 0x001eacd0
clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt const*) + 88
13 clang 0x0020dfe5
clang::CodeGen::CodeGenFunction::EmitFunctionBody(llvm::SmallVector<std::pair<clang::VarDecl
const*, clang::QualType>, 16u>&) + 151
14 clang 0x0020f2ae
clang::CodeGen::CodeGenFunction::GenerateCode(clang::CodeGen::GlobalDecl,
llvm::Function*) + 1234
15 clang 0x002176b0
clang::CodeGen::CodeGenModule::EmitGlobalFunctionDefinition(clang::CodeGen::GlobalDecl)
+ 708
16 clang 0x002181d4
clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::CodeGen::GlobalDecl)
+ 298
17 clang 0x00218c06 clang::CodeGen::CodeGenModule::EmitDeferred() +
360
18 clang 0x00218e3c clang::CodeGen::CodeGenModule::Release() + 24
19 clang 0x002300a6 (anonymous
namespace)::CodeGeneratorImpl::HandleTranslationUnit(clang::ASTContext&) + 88
20 clang 0x000441d2 (anonymous
namespace)::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) + 100
21 clang 0x0023ede0 clang::ParseAST(clang::Preprocessor&,
clang::ASTConsumer*, clang::ASTContext&, bool, bool,
clang::CodeCompleteConsumer*) + 673
22 clang 0x0006333b clang::ASTFrontendAction::ExecuteAction() + 269
23 clang 0x00063458 clang::FrontendAction::Execute() + 278
24 clang 0x000472eb
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 879
25 clang 0x0002a13b cc1_main(char const**, char const**, char
const*, void*) + 1979
26 clang 0x0002e03b main + 272
27 clang 0x00028e79 start + 53
28 clang 0x00000020 start + 4294799836
Stack dump:
0. Program arguments: /usr/local/bin/clang -cc1 -triple
i386-apple-darwin10.0.0 -S -disable-free -main-file-name
crash_without_assert.cpp -pic-level 1 -mdisable-fp-elim -target-cpu yonah
-resource-dir /usr/local/lib/clang/2.0 -ferror-limit 19
-ftemplate-backtrace-limit 10 -fmessage-length 80 -stack-protector 1 -fblocks
-fexceptions -fdiagnostics-show-option -fcolor-diagnostics -o
/var/folders/M8/M86fCFVgGQ0r-V2oY5lLC++++TI/-Tmp-/cc-eEB284.s -x c++
/Users/caj/Dropbox/crash_without_assert.cpp
1. <eof> parser at end of file
2. Per-file LLVM IR generation
3. /Users/caj/Dropbox/crash_without_assert.cpp:12:7: Generating code for
declaration 'hash_function<1>::op'
4. /Users/caj/Dropbox/crash_without_assert.cpp:13:3: LLVM IR generation of
compound statement ('{}')
clang: error: compiler command failed due to signal 10 (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