I pretty much get consistently infinite recursion by scrolling around the yoshi game. Here is a stack excerpt:

`#1 0x000000000062a05a in dirtylist_t::dirty (this=0x9fa8e0, x0=624, y0=160, x1=927, y1=175, ind=0, col=128) at simdirty.cc:121`

#2 0x000000000062a5d7 in dirtylist_t::dirty (this=0x9fa8e0, x0=656, y0=160, x1=927, y1=175, ind=208, col=171) at simdirty.cc:217

#3 0x000000000062a092 in dirtylist_t::dirty (this=0x9fa8e0, x0=624, y0=160, x1=927, y1=175, ind=0, col=128) at simdirty.cc:122

#4 0x000000000062a5d7 in dirtylist_t::dirty (this=0x9fa8e0, x0=656, y0=160, x1=927, y1=175, ind=208, col=171) at simdirty.cc:217

#5 0x000000000062a092 in dirtylist_t::dirty (this=0x9fa8e0, x0=624, y0=160, x1=927, y1=175, ind=0, col=128) at simdirty.cc:122

#6 0x000000000062a5d7 in dirtylist_t::dirty (this=0x9fa8e0, x0=656, y0=160, x1=927, y1=175, ind=208, col=171) at simdirty.cc:217

#7 0x000000000062a092 in dirtylist_t::dirty (this=0x9fa8e0, x0=624, y0=160, x1=927, y1=175, ind=0, col=128) at simdirty.cc:122

see the repeating arguments ...

Edit: This can be fixed by always doing the recursive calls with the index argument set to i+1 (these are the calls for merged regions). Imho there is no need to call with index=0, as the list maintains disjoint rectangles.

Btw, are the dirty regions defined as x0 <= x < x1 or x0 <= x <= x1 ?