Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NullPointerException in BodyCodeGen #410

Open
rohanpadhye opened this issue Mar 16, 2018 · 2 comments
Open

NullPointerException in BodyCodeGen #410

rohanpadhye opened this issue Mar 16, 2018 · 2 comments
Labels
bug Issues considered a bug Ecma Incompatibility Issues about Rhino being incompatible with the EcmaScript spec Java Exception Leaking Issues related to Java Exceptions leaking into JavaScript

Comments

@rohanpadhye
Copy link

Input to Rhino 1.7.8:

[a.b.c] = x

Throws:

java.lang.NullPointerException
	at org.mozilla.javascript.optimizer.BodyCodegen.generateExpression(Codegen.java:2178)
	at org.mozilla.javascript.optimizer.BodyCodegen.visitGetProp(Codegen.java:5088)
	at org.mozilla.javascript.optimizer.BodyCodegen.generateExpression(Codegen.java:2548)
	at org.mozilla.javascript.optimizer.BodyCodegen.visitSetProp(Codegen.java:5132)
	at org.mozilla.javascript.optimizer.BodyCodegen.generateExpression(Codegen.java:2610)
	at org.mozilla.javascript.optimizer.BodyCodegen.generateExpression(Codegen.java:2309)
	at org.mozilla.javascript.optimizer.BodyCodegen.generateExpression(Codegen.java:2807)
	at org.mozilla.javascript.optimizer.BodyCodegen.generateExpression(Codegen.java:2309)
	at org.mozilla.javascript.optimizer.BodyCodegen.generateExpression(Codegen.java:2807)
	at org.mozilla.javascript.optimizer.BodyCodegen.generateStatement(Codegen.java:2059)
	at org.mozilla.javascript.optimizer.BodyCodegen.generateStatement(Codegen.java:1870)
	at org.mozilla.javascript.optimizer.BodyCodegen.generateBodyCode(Codegen.java:1292)
	at org.mozilla.javascript.optimizer.Codegen.generateCode(Codegen.java:307)
	at org.mozilla.javascript.optimizer.Codegen.compileToClassFile(Codegen.java:166)
	at org.mozilla.javascript.optimizer.Codegen.compile(Codegen.java:75)
	at org.mozilla.javascript.Context.compileImpl(Context.java:2551)
	at org.mozilla.javascript.Context.compileString(Context.java:1507)
	at org.mozilla.javascript.Context.compileString(Context.java:1496)

Found using JQF; auto-generated test case was [Vinu.en.en]=proted.

@rohanpadhye
Copy link
Author

rohanpadhye commented Mar 18, 2019

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

@p-bakker
Copy link
Collaborator

p-bakker commented Jul 5, 2021

While the stacktrace above was taken when running in non-interpreted mode, a similar issue occurs in interpreted mode

@p-bakker p-bakker added bug Issues considered a bug Java Exception Leaking Issues related to Java Exceptions leaking into JavaScript labels Jul 5, 2021
@p-bakker p-bakker added the Ecma Incompatibility Issues about Rhino being incompatible with the EcmaScript spec label Oct 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues considered a bug Ecma Incompatibility Issues about Rhino being incompatible with the EcmaScript spec Java Exception Leaking Issues related to Java Exceptions leaking into JavaScript
Projects
None yet
Development

No branches or pull requests

2 participants