[LLVMbugs] [Bug 7027] New: crash without assert in boost code

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon May 3 10:17:30 PDT 2010


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

           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=4807)
 --> (http://llvm.org/bugs/attachment.cgi?id=4807)
Crashing testcase

The attached testsuite crashes, without an assert. It is (I believe) valid
code, reduced from a boost test case.

~/Dropbox$ clang++ crash_without_assert.cpp -c -w
0  clang             0x00f54489 PrintStackTrace(void*) + 45
1  clang             0x00f549d3 SignalHandler(int) + 374
2  libSystem.B.dylib 0x91cc842b _sigtramp + 43
3  libSystem.B.dylib 0xffffffff _sigtramp + 1848867839
4  clang             0x00c3f559 llvm::isa_impl<llvm::Constant,
llvm::Value>::doit(llvm::Value const&) + 17
5  clang             0x00706c99 llvm::isa_impl_wrap<llvm::Constant, llvm::Value
const, llvm::Value const>::doit(llvm::Value const&) + 17
6  clang             0x009c7d85 bool
llvm::isa_impl_cl<llvm::Value>::isa<llvm::Constant>(llvm::Value const&) + 17
7  clang             0x00706caf bool
llvm::isa_impl_cl<llvm::Value*>::isa<llvm::Constant>(llvm::Value*) + 17
8  clang             0x00de9467 bool llvm::isa<llvm::Constant,
llvm::Value*>(llvm::Value* const&) + 19
9  clang             0x006df3b5 llvm::cast_retty<llvm::Constant,
llvm::Value*>::ret_type llvm::dyn_cast<llvm::Constant,
llvm::Value*>(llvm::Value* const&) + 17
10 clang             0x001b2bee llvm::IRBuilder<true, llvm::ConstantFolder,
llvm::IRBuilderDefaultInserter<true>
>::CreateConstInBoundsGEP2_32(llvm::Value*, unsigned int, unsigned int,
llvm::Twine const&) + 138
11 clang             0x001b2cb4 llvm::IRBuilder<true, llvm::ConstantFolder,
llvm::IRBuilderDefaultInserter<true> >::CreateStructGEP(llvm::Value*, unsigned
int, llvm::Twine const&) + 46
12 clang             0x0018d04a (anonymous
namespace)::AggExprEmitter::VisitUnaryAddrOf(clang::UnaryOperator const*) + 336
13 clang             0x0018eb2c clang::StmtVisitor<(anonymous
namespace)::AggExprEmitter, void>::Visit(clang::Stmt*) + 1088
14 clang             0x0018f5f7
clang::CodeGen::CodeGenFunction::EmitAggExpr(clang::Expr const*, llvm::Value*,
bool, bool, bool, bool) + 293
15 clang             0x001866bc
clang::CodeGen::CodeGenFunction::EmitAnyExpr(clang::Expr const*, llvm::Value*,
bool, bool, bool) + 264
16 clang             0x001eb5b8
clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt const*) + 488
17 clang             0x001ecea9
clang::CodeGen::CodeGenFunction::EmitCompoundStmt(clang::CompoundStmt const&,
bool, llvm::Value*, bool) + 253
18 clang             0x001ed092
clang::CodeGen::CodeGenFunction::EmitSimpleStmt(clang::Stmt const*) + 182
19 clang             0x001eb428
clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt const*) + 88
20 clang             0x00167f26
clang::CodeGen::CodeGenFunction::EmitConstructorBody(llvm::SmallVector<std::pair<clang::VarDecl
const*, clang::QualType>, 16u>&) + 382
21 clang             0x00210433
clang::CodeGen::CodeGenFunction::GenerateCode(clang::CodeGen::GlobalDecl,
llvm::Function*) + 1211
22 clang             0x0015cff0
clang::CodeGen::CodeGenModule::EmitCXXConstructor(clang::CXXConstructorDecl
const*, clang::CXXCtorType) + 272
23 clang             0x0021934b
clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::CodeGen::GlobalDecl)
+ 205
24 clang             0x00219dda clang::CodeGen::CodeGenModule::EmitDeferred() +
360
25 clang             0x0021a010 clang::CodeGen::CodeGenModule::Release() + 24
26 clang             0x00231352 (anonymous
namespace)::CodeGeneratorImpl::HandleTranslationUnit(clang::ASTContext&) + 88
27 clang             0x00044e66 (anonymous
namespace)::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) + 100
28 clang             0x0024002c clang::ParseAST(clang::Preprocessor&,
clang::ASTConsumer*, clang::ASTContext&, bool, bool,
clang::CodeCompleteConsumer*) + 673
29 clang             0x00063d6f clang::ASTFrontendAction::ExecuteAction() + 269
30 clang             0x00063e8c clang::FrontendAction::Execute() + 278
31 clang             0x00047ea3
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 879
32 clang             0x0002ab7f cc1_main(char const**, char const**, char
const*, void*) + 1979
33 clang             0x0002eaa5 main + 272
34 clang             0x000298bd start + 53
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 -w -ferror-limit 19
-ftemplate-backtrace-limit 10 -fmessage-length 119 -stack-protector 1 -fblocks
-fexceptions -fdiagnostics-show-option -fcolor-diagnostics -o
/var/folders/M8/M86fCFVgGQ0r-V2oY5lLC++++TI/-Tmp-/cc-8ie7Vq.s -x c++
crash_without_assert.cpp 
1.    <eof> parser at end of file
2.    Per-file LLVM IR generation
3.    crash_without_assert.cpp:14:1: Generating code for declaration
'massive_hash_function_test::massive_hash_function_test'
4.    crash_without_assert.cpp:15:1: 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