Excellent bug report. But I think the analysis is not 100% correct. The main problem was that the 'break' statement in the END_DOCUMENT case should break the parsing loop and not the switch/case. I'm going with a loop label and using instantShutdown(). It still makes sense to change the return to throw for consistency.
↧