[LLVMbugs] [Bug 4082] New: bizarre array causes crash in target folder
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Sun Apr 26 14:03:05 PDT 2009
http://llvm.org/bugs/show_bug.cgi?id=4082
Summary: bizarre array causes crash in target folder
Product: tools
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: llvm-g++
AssignedTo: unassignedbugs at nondot.org
ReportedBy: nicholas at mxc.ca
CC: llvmbugs at cs.uiuc.edu
Created an attachment (id=2898)
--> (http://llvm.org/bugs/attachment.cgi?id=2898)
testcase (y.c, actually c++)
This crashes in llvm-g++ on 64-bit Linux but not 32-bit Linux.
$ llvm-g++ y.c
cc1plus: Constants.cpp:2239: static llvm::Constant*
llvm::ConstantExpr::getGetElementPtr(llvm::Constant*, llvm::Value* const*,
unsigned int): Assertion `Ty && "GEP indices invalid!"' failed.
y.c:30: internal compiler error: Aborted
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://llvm.org/bugs/> for instructions.
(gdb) bt
#0 0x00007f1847412095 in raise () from /lib/libc.so.6
#1 0x00007f1847413af0 in abort () from /lib/libc.so.6
#2 0x00007f184740b2df in __assert_fail () from /lib/libc.so.6
#3 0x0000000000ff4978 in llvm::ConstantExpr::getGetElementPtr (C=0x19abdc8,
Idxs=0x19b1be0, NumIdx=2) at Constants.cpp:2239
#4 0x00000000008a1e64 in TreeConstantToLLVM::EmitLV_ARRAY_REF (exp=0x19aa8a0)
at
/usr/local/google/home/nlewycky/llvm/include/llvm/Support/TargetFolder.h:118
#5 0x00000000008a15a5 in TreeConstantToLLVM::Convert (exp=0x7f184731c780)
at ../../src/gcc/llvm-convert.cpp:6421
#6 0x00000000008a36b0 in TreeConstantToLLVM::ConvertNOP_EXPR (
exp=0x7f184731c7c0) at ../../src/gcc/llvm-convert.cpp:6583
#7 0x00000000008a28bb in TreeConstantToLLVM::ConvertArrayCONSTRUCTOR (
exp=0x7f18473314b0) at ../../src/gcc/llvm-convert.cpp:6688
#8 0x0000000000890b52 in emit_global_to_llvm (decl=0x7f1847326c00)
at ../../src/gcc/llvm-backend.cpp:1263
#9 0x000000000085f237 in assemble_variable () at varasm.c:1781
#10 0x00000000009102bb in cgraph_varpool_assemble_decl () at cgraphunit.c:940
#11 0x00000000009104e6 in cgraph_varpool_assemble_pending_decls ()
at cgraphunit.c:958
#12 0x0000000000911fd1 in cgraph_optimize () at cgraphunit.c:1620
#13 0x00000000004aa9d6 in cp_finish_file () at decl2.c:3343
#14 0x0000000000415d99 in finish_file () at cp-lang.c:150
---Type <return> to continue, or q <return> to quit---
#15 0x000000000056f125 in c_common_parse_file () at c-opts.c:1305
#16 0x00000000008328a4 in toplev_main () at toplev.c:2287
#17 0x000000000057dbce in main (argc=2, argv=0x7fff5071ff28)
at ../../src/gcc/llvm-main.cpp:38
(gdb) up 3
#3 0x0000000000ff4978 in llvm::ConstantExpr::getGetElementPtr (C=0x19abdc8,
Idxs=0x19b1be0, NumIdx=2) at Constants.cpp:2239
2239 assert(Ty && "GEP indices invalid!");
(gdb) p Ty
$1 = (const llvm::Type *) 0x0
(gdb) p C
$2 = (class llvm::Constant *) 0x19abdc8
(gdb) p C->dump()
@_ZN17_Foo_NameInfoInit6by_posE = global %0 zeroinitializer, align 4
; <%0*> [#uses=1]
$3 = void
(gdb) up
#4 0x00000000008a1e64 in TreeConstantToLLVM::EmitLV_ARRAY_REF (exp=0x19aa8a0)
at
/usr/local/google/home/nlewycky/llvm/include/llvm/Support/TargetFolder.h:118
118 return Fold(ConstantExpr::getGetElementPtr(C, IdxList, NumIdx));
(gdb) p IdxList
No symbol "IdxList" in current context.
(gdb) p NumIdx
No symbol "NumIdx" in current context.
(gdb) up
#5 0x00000000008a15a5 in TreeConstantToLLVM::Convert (exp=0x7f184731c780)
at ../../src/gcc/llvm-convert.cpp:6421
6421 ConvertType(TREE_TYPE(exp)));
--
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