[LLVMbugs] [Bug 3667] New: instcombine divide by zero on array with zero-length element type
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Wed Feb 25 05:40:28 PST 2009
http://llvm.org/bugs/show_bug.cgi?id=3667
Summary: instcombine divide by zero on array with zero-length
element type
Product: new-bugs
Version: unspecified
Platform: Other
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: new bugs
AssignedTo: unassignedbugs at nondot.org
ReportedBy: baldrick at free.fr
CC: llvmbugs at cs.uiuc.edu
Created an attachment (id=2608)
--> (http://llvm.org/bugs/attachment.cgi?id=2608)
testcase .ll
$ opt -instcombine -disable-output divide_by_zero.bc
0 opt 0x0000000000d956b2
1 opt 0x0000000000d95a0c
2 libc.so.6 0x00007f2605387040
3 opt 0x0000000000a21c98
4 opt 0x0000000000a223bf
5 opt 0x0000000000a2a8af
6 opt 0x0000000000a2b27a
7 opt 0x0000000000a2b582
8 opt 0x0000000000cefb81
llvm::FPPassManager::runOnFunction(llvm::Function&) + 239
9 opt 0x0000000000cefce4
llvm::FPPassManager::runOnModule(llvm::Module&) + 82
10 opt 0x0000000000ceefb7
llvm::MPPassManager::runOnModule(llvm::Module&) + 189
11 opt 0x0000000000cf05c2 llvm::PassManagerImpl::run(llvm::Module&) +
116
12 opt 0x0000000000cf0625 llvm::PassManager::run(llvm::Module&) + 33
13 opt 0x00000000008f738c main + 4192
14 libc.so.6 0x00007f26053725a6 __libc_start_main + 230
15 opt 0x00000000008d1359
Floating point exception (core dumped)
The problem is that ArrayEltSize is zero here:
10836 // If the index will be to exactly the right offset with the
scale taken
10837 // out, perform the transformation. Note, we don't know whether
Scale is
10838 // signed or not. We'll use unsigned version of division/modulo
10839 // operation after making sure Scale doesn't have the sign bit
set.
10840 if (Scale && Scale->getSExtValue() >= 0LL &&
10841 Scale->getZExtValue() % ArrayEltSize == 0) {
--
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