http://llvm.org/bugs/show_bug.cgi?id=3968
Summary: MachineSinking::ProcessBlock crashes by moving iterator
off the begining of ilist
Product: libraries
Version: trunk
Platform: Macintosh
OS/Version: MacOS X
Status: NEW
Severity: normal
Priority: P2
Component: Common Code Generator Code
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
The attached bugpoint-generated file causes a crash in a debug build of llc:
$ bin/llvm-as < ~/machine-sinking-crash.ll | bin/llc
Stack dump:
0. Program arguments: bin/llc
1. Running pass 'Machine code sinking' on function '@QRiterate'
Bus error
The crash happens in:
ilist_iterator &operator--() { // predecrement - Back up
NodePtr = Traits::getPrev(NodePtr);
assert(Traits::getNext(NodePtr) && "--'d off the beginning of an ilist!");
return *this;
}
MachineSinking::ProcessBlock calls operator-- on an iterator with a null prev
pointer. The assert then calls getNext with a null pointer, causing the bus
error.
There are two separate issues here:
1. The assertion should be: assert(NodePtr && "--'d off...
2. MachineSinking::ProcessBlock should not call operator-- on an invalid
iterator
--
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs