This is because it is called with w=0 (for glyphs, as per comment a few lines
*** Bug 6854 has been marked as a duplicate of this bug. ***
Created attachment 6000 [details] [review]
avoid endless loop
Created attachment 6002 [details] [review]
Extend sanity check in exaLog2 for negative numbers
How about this one instead, to avoid similar issues in the future?
I pushed my patch.