mozilla/rhino

ArrayIndexOutOfBoundsException when parsing '<!-'

rohanpadhye opened this issue · 1 comments

Input to Rhino 1.7.8

<!-

Throws:

java.lang.ArrayIndexOutOfBoundsException: 3

	at org.mozilla.javascript.TokenStream.ungetChar(TokenStream.java:1454)
	at org.mozilla.javascript.TokenStream.getFirstXMLToken(TokenStream.java:1156)
	at org.mozilla.javascript.Parser.xmlInitializer(Parser.java:2559)
	at org.mozilla.javascript.Parser.unaryExpr(Parser.java:2534)
	at org.mozilla.javascript.Parser.mulExpr(Parser.java:2464)
	at org.mozilla.javascript.Parser.addExpr(Parser.java:2448)
	at org.mozilla.javascript.Parser.shiftExpr(Parser.java:2429)
	at org.mozilla.javascript.Parser.relExpr(Parser.java:2404)
	at org.mozilla.javascript.Parser.eqExpr(Parser.java:2376)
	at org.mozilla.javascript.Parser.bitAndExpr(Parser.java:2365)
	at org.mozilla.javascript.Parser.bitXorExpr(Parser.java:2354)
	at org.mozilla.javascript.Parser.bitOrExpr(Parser.java:2343)
	at org.mozilla.javascript.Parser.andExpr(Parser.java:2332)
	at org.mozilla.javascript.Parser.orExpr(Parser.java:2321)
	at org.mozilla.javascript.Parser.condExpr(Parser.java:2285)
	at org.mozilla.javascript.Parser.assignExpr(Parser.java:2248)
	at org.mozilla.javascript.Parser.expr(Parser.java:2227)
	at org.mozilla.javascript.Parser.statementHelper(Parser.java:1241)
	at org.mozilla.javascript.Parser.statement(Parser.java:1103)
	at org.mozilla.javascript.Parser.parse(Parser.java:642)
	at org.mozilla.javascript.Parser.parse(Parser.java:577)
	at org.mozilla.javascript.Context.compileImpl(Context.java:2522)
	at org.mozilla.javascript.Context.compileString(Context.java:1507)
	at org.mozilla.javascript.Context.compileString(Context.java:1496)

Test case generated automatically by JQF.

This bug is possibly related to #397.

Hi, it's been more than one year since this was first reported. Are there any updates?