[LLVMbugs] [Bug 13460] clang crash: "Assertion in Casting.h:194 failed."

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Jul 26 17:06:25 PDT 2012


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

Benjamin Lorenz <llvm at fortitu.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |DUPLICATE

--- Comment #2 from Benjamin Lorenz <llvm at fortitu.de> 2012-07-26 19:06:25 CDT ---
Your testcase also crashes clang 3.0 with a stacktrace (see below) similar to
the one in http://llvm.org/bugs/show_bug.cgi?id=13156 and the code also looks
similar. So I tested the patch from there and it does fix the crashes also in
my original code. Thanks for the help and I suppose I can close this as
duplicate then.

Backtrace for clang 3.0 with the further reduced code:
Program received signal SIGSEGV, Segmentation fault.
0x00000000019cadfe in llvm::ConstantFoldCastInstruction (opc=45, V=0x221e930,
DestTy=0x10000000d) at
/myhome/software/clang/30/llvm/lib/VMCore/ConstantFold.cpp:520
520       if (V->getType()->isPPC_FP128Ty() || DestTy->isPPC_FP128Ty())
(gdb) bt
#0  0x00000000019cadfe in llvm::ConstantFoldCastInstruction (opc=45,
V=0x221e930, DestTy=0x10000000d) at
/myhome/software/clang/30/llvm/lib/VMCore/ConstantFold.cpp:520
#1  0x00000000019d3635 in getFoldedCast (opc=llvm::Instruction::BitCast,
C=0x221e930, Ty=0x10000000d) at
/myhome/software/clang/30/llvm/lib/VMCore/Constants.cpp:1218
#2  0x00000000009bec85 in CreateCast (DestTy=<optimized out>, C=0x221e930,
Op=llvm::Instruction::BitCast, this=<optimized out>) at
/myhome/software/clang/30/llvm/include/llvm/Support/ConstantFolder.h:157
#3  CreateCast (DestTy=<optimized out>, V=0x221e930,
Op=llvm::Instruction::BitCast, this=0x7fffffff9f18, Name=<optimized out>) at
/myhome/software/clang/30/llvm/include/llvm/Support/IRBuilder.h:985
#4  CreateBitCast (Name=<optimized out>, DestTy=<optimized out>, V=0x221e930,
this=0x7fffffff9f18) at
/myhome/software/clang/30/llvm/include/llvm/Support/IRBuilder.h:954
#5  clang::CodeGen::CodeGenFunction::EmitCall (this=0x7fffffff9ec0,
CallInfo=..., Callee=0x2220d68, ReturnValue=..., CallArgs=...,
TargetDecl=0x221aa60, callOrInvoke=0x0)
    at /myhome/software/clang/30/llvm/tools/clang/lib/CodeGen/CGCall.cpp:1655
#6  0x00000000009fadcd in clang::CodeGen::CodeGenFunction::EmitCall
(this=0x7fffffff9ec0, CalleeType=<optimized out>, Callee=0x2220d68,
ReturnValue=..., ArgBeg=<optimized out>, ArgEnd=..., TargetDecl=0x221aa60)
    at /myhome/software/clang/30/llvm/tools/clang/lib/CodeGen/CGExpr.cpp:2458
#7  0x00000000009fd39d in clang::CodeGen::CodeGenFunction::EmitCallExpr
(this=0x7fffffff9ec0, E=0x221f0f0, ReturnValue=...) at
/myhome/software/clang/30/llvm/tools/clang/lib/CodeGen/CGExpr.cpp:2262
#8  0x0000000000a0312f in VisitCallExpr (E=0x221f0f0, this=0x7fffffff99f0) at
/myhome/software/clang/30/llvm/tools/clang/lib/CodeGen/CGExprAgg.cpp:398
#9  (anonymous namespace)::AggExprEmitter::VisitCallExpr (this=0x7fffffff99f0,
E=0x221f0f0) at
/myhome/software/clang/30/llvm/tools/clang/lib/CodeGen/CGExprAgg.cpp:392
#10 0x0000000000a03d4a in clang::StmtVisitorBase<clang::make_ptr,
{anonymous}::AggExprEmitter, void>::Visit(clang::make_ptr<clang::Stmt>::type)
(this=0x7fffffff99f0, S=0x221f0f0)
    at
/myhome/software/clang/30/build/tools/clang/lib/CodeGen/../../include/clang/AST/StmtNodes.inc:259
#11 0x0000000000a05375 in VisitUnaryExtension (E=<optimized out>,
this=<optimized out>) at
/myhome/software/clang/30/llvm/tools/clang/lib/CodeGen/CGExprAgg.cpp:100
#12 Visit (S=0x221f0f0, this=0x7fffffff99f0) at
/myhome/software/clang/30/llvm/tools/clang/lib/CodeGen/../../include/clang/AST/StmtVisitor.h:96
#13 clang::CodeGen::CodeGenFunction::EmitAggExpr (this=0x7fffffff9ec0,
E=0x221f0f0, Slot=..., IgnoreResult=true) at
/myhome/software/clang/30/llvm/tools/clang/lib/CodeGen/CGExprAgg.cpp:1054
#14 0x00000000009f46cc in clang::CodeGen::CodeGenFunction::EmitAnyExpr
(this=0x7fffffff9ec0, E=0x221f0f0, AggSlot=..., IgnoreResult=true)
    at /myhome/software/clang/30/llvm/tools/clang/lib/CodeGen/CGExpr.cpp:116
#15 0x00000000009ff4c8 in clang::CodeGen::CodeGenFunction::EmitIgnoredExpr
(this=<optimized out>, E=<optimized out>) at
/myhome/software/clang/30/llvm/tools/clang/lib/CodeGen/CGExpr.cpp:99
#16 0x0000000000a7e55f in EmitStmt (S=0x221f0f0, this=0x7fffffff9ec0) at
/myhome/software/clang/30/llvm/tools/clang/lib/CodeGen/CGStmt.cpp:98
#17 clang::CodeGen::CodeGenFunction::EmitStmt (this=0x7fffffff9ec0,
S=0x221f0f0) at
/myhome/software/clang/30/llvm/tools/clang/lib/CodeGen/CGStmt.cpp:43
#18 0x0000000000a80f2f in clang::CodeGen::CodeGenFunction::EmitCompoundStmt
(this=0x7fffffff9ec0, S=..., GetLast=false, AggSlot=...) at
/myhome/software/clang/30/llvm/tools/clang/lib/CodeGen/CGStmt.cpp:202
#19 0x0000000000a8119c in clang::CodeGen::CodeGenFunction::EmitSimpleStmt
(this=<optimized out>, S=<optimized out>) at
/myhome/software/clang/30/llvm/tools/clang/lib/CodeGen/CGStmt.cpp:172
#20 0x0000000000a7e453 in clang::CodeGen::CodeGenFunction::EmitStmt
(this=0x7fffffff9ec0, S=0x221f288) at
/myhome/software/clang/30/llvm/tools/clang/lib/CodeGen/CGStmt.cpp:47
#21 0x0000000000a8f18c in clang::CodeGen::CodeGenFunction::GenerateCode
(this=0x7fffffff9ec0, GD=..., Fn=0x2220450, FnInfo=...)
    at
/myhome/software/clang/30/llvm/tools/clang/lib/CodeGen/CodeGenFunction.cpp:420
#22 0x000000000098f39b in
clang::CodeGen::CodeGenModule::EmitGlobalFunctionDefinition (this=0x2208de0,
GD=...) at
/myhome/software/clang/30/llvm/tools/clang/lib/CodeGen/CodeGenModule.cpp:1638
#23 0x00000000009904a3 in clang::CodeGen::CodeGenModule::EmitGlobalDefinition
(this=0x2208de0, GD=...) at
/myhome/software/clang/30/llvm/tools/clang/lib/CodeGen/CodeGenModule.cpp:944
#24 0x0000000000990aad in clang::CodeGen::CodeGenModule::EmitGlobal
(this=0x2208de0, GD=...) at
/myhome/software/clang/30/llvm/tools/clang/lib/CodeGen/CodeGenModule.cpp:837
#25 0x000000000099161b in clang::CodeGen::CodeGenModule::EmitTopLevelDecl
(this=0x2208de0, D=0x221ab20) at
/myhome/software/clang/30/llvm/tools/clang/lib/CodeGen/CodeGenModule.cpp:2286
#26 0x000000000097a28c in (anonymous
namespace)::CodeGeneratorImpl::HandleTopLevelDecl (this=0x21e6e40, DG=...) at
/myhome/software/clang/30/llvm/tools/clang/lib/CodeGen/ModuleBuilder.cpp:65
#27 0x0000000000979c17 in clang::BackendConsumer::HandleTopLevelDecl
(this=0x21e6a50, D=...) at
/myhome/software/clang/30/llvm/tools/clang/lib/CodeGen/CodeGenAction.cpp:90
#28 0x0000000000aaa714 in clang::ParseAST (S=..., PrintStats=false) at
/myhome/software/clang/30/llvm/tools/clang/lib/Parse/ParseAST.cpp:89
#29 0x00000000008423f3 in clang::CompilerInstance::ExecuteAction
(this=0x21d21e0, Act=...) at
/myhome/software/clang/30/llvm/tools/clang/lib/Frontend/CompilerInstance.cpp:631
#30 0x0000000000825ae4 in clang::ExecuteCompilerInvocation (Clang=0x21d21e0) at
/myhome/software/clang/30/llvm/tools/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp:173
#31 0x00000000008163fb in cc1_main (ArgBegin=<optimized out>,
ArgEnd=0x7fffffffc840, Argv0=0x21d2038 "/opt/clang30/bin/clang",
MainAddr=0x81f460)
    at /myhome/software/clang/30/llvm/tools/clang/tools/driver/cc1_main.cpp:159
#32 0x000000000080a9ec in main (argc_=4, argv_=0x7fffffffdaa8) at
/myhome/software/clang/30/llvm/tools/clang/tools/driver/driver.cpp:354

*** This bug has been marked as a duplicate of bug 13156 ***

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