Open sideshowbarker opened 6 years ago
Yep, it’s a bug.
TokenStream
’s ungetChar()
cannot “unread” past across the line boundary (I don’t know why yet) and because we think that <!
is a start of an XML token (like <!--
or <![CDATA
), we call the peekChar()
that in turn calls getChar()
(skips \n
and returns 'd'
from the next line) and then ungetChar()
which throws.
If it’s something that is critical for you, @sideshowbarker, you can disable E4X feature until the fix is available.
Thanks for troubleshooting this and identifying the cause.
If it’s something that is critical for you, @sideshowbarker, you can disable E4X feature until the fix is available.
OK — but it’s not critical for me, so I reckon I’ll just wait for the fix
The (syntactically-invalid) character sequence
<!\n
(<!
followed by a newline) causes Rhino to throwjava.lang.IllegalStateException: FAILED ASSERTION
(see stack trace below).It should instead just cause a parse error.
Here are few websites that have
script
elements with that<!\n
sequence —http://arc-n-ciel.ucoz.ru/ http://indigo-clen.at.ua/ http://zavalkevich.at.ua/ http://mp654k.at.ua/ http://shinar.ucoz.ru/ http://gcteam.ucoz.ru/ http://rockbook.hu http://allshoes.at.ua/ http://avrillavignefun.moy.su/
The sites all seem to have something similar to the following:
The stack trace I get looks like this: