[LLVMbugs] [Bug 22595] New: Crash in Early-CSE with constants with leading empty structs

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun Feb 15 03:41:36 PST 2015


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

            Bug ID: 22595
           Summary: Crash in Early-CSE with constants with leading empty
                    structs
           Product: new-bugs
           Version: 3.6
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: bsteinbr at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 13867
  --> http://llvm.org/bugs/attachment.cgi?id=13867&action=edit
IR that causes a crash in Early-CSE

The attached testcase causes a crash in Early-CSE.

include/llvm/IR/DerivedTypes.h:291: llvm::Type*
llvm::StructType::getElementType(unsigned int) const: Assertion `N <
NumContainedTys && "Element number out of range!"' failed.
0  opt             0x000000000145dc52 llvm::sys::PrintStackTrace(_IO_FILE*) +
34
1  opt             0x000000000145c0c1
2  libpthread.so.0 0x00007fe9e109d8d0
3  libc.so.6       0x00007fe9e02dd107 gsignal + 55
4  libc.so.6       0x00007fe9e02de4e8 abort + 328
5  libc.so.6       0x00007fe9e02d6226
6  libc.so.6       0x00007fe9e02d62d2
7  opt             0x0000000000607ce4
8  opt             0x00000000011716dd llvm::Type::getStructElementType(unsigned
int) const + 45
9  opt             0x000000000109518d
llvm::ConstantAggregateZero::getStructElement(unsigned int) const + 13
10 opt             0x0000000000d5ce25
llvm::ConstantFoldLoadFromConstPtr(llvm::Constant*, llvm::DataLayout const*) +
2149
11 opt             0x0000000000d61e82
llvm::ConstantFoldInstruction(llvm::Instruction*, llvm::DataLayout const*,
llvm::TargetLibraryInfo const*) + 466
12 opt             0x0000000000d97bae
llvm::SimplifyInstruction(llvm::Instruction*, llvm::DataLayout const*,
llvm::TargetLibraryInfo const*, llvm::DominatorTree const*,
llvm::AssumptionCache*) + 2110
13 opt             0x000000000131c730
14 opt             0x000000000131df4b
15 opt             0x0000000001159ea0
llvm::FPPassManager::runOnFunction(llvm::Function&) + 480
16 opt             0x000000000115a23b
llvm::FPPassManager::runOnModule(llvm::Module&) + 43
17 opt             0x000000000115a52f
llvm::legacy::PassManagerImpl::run(llvm::Module&) + 719
18 opt             0x0000000000657161 main + 4401
19 libc.so.6       0x00007fe9e02c9b45 __libc_start_main + 245
20 opt             0x000000000067d9f1
Stack dump:
0.      Program arguments: bin/opt -early-cse empty-vec-crash.ll 
1.      Running pass 'Function Pass Manager' on module 'empty-vec-crash.ll'.
2.      Running pass 'Early CSE' on function '@crash_on_zeroinit'

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150215/6a513619/attachment.html>


More information about the llvm-bugs mailing list