[LLVMbugs] [Bug 3968] New: MachineSinking:: ProcessBlock crashes by moving iterator off the begining of ilist
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Thu Apr 9 23:51:55 PDT 2009
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: unassignedbugs at nondot.org
ReportedBy: stoklund at 2pi.dk
CC: llvmbugs at cs.uiuc.edu
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.
More information about the llvm-bugs
mailing list