-
Bug
-
Resolution: Fixed
-
P3
-
8-pool, 9
-
b74
-
x86_64
-
windows_7
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8136311 | emb-9 | Sundararajan Athijegannathan | P3 | Resolved | Fixed | team |
JDK-8140958 | 8u91 | Sundararajan Athijegannathan | P3 | Resolved | Fixed | b01 |
JDK-8132516 | 8u72 | Sundararajan Athijegannathan | P3 | Resolved | Fixed | b01 |
JDK-8147327 | emb-8u91 | Sundararajan Athijegannathan | P3 | Resolved | Fixed | b01 |
FULL PRODUCT VERSION :
java version "1.8.0_45"
Java(TM) SE Runtime Environment (build 1.8.0_45-b15)
Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Windows -7
A DESCRIPTION OF THE PROBLEM :
public static void main(String[] args) throws ScriptException {
ScriptEngine engine = new ScriptEngineManager().getEngineByName("js");
engine.eval("Object.prototype.merge = function(obj2){ return this; }");
engine.eval("function nothingTodo(k, v) {return v}");
engine.eval("JSON.parse('{\"name\" : \"jack\"}')");
// ^^^^^^^^^^^^ THAT IS OK
engine.eval("JSON.parse('{\"name\" : \"jack\"}', nothingTodo)");
// ^^^^^^^^^^^^ DEAD LOOP
}
Exception in thread "main" java.lang.StackOverflowError
at jdk.nashorn.internal.runtime.PropertyHashMap.find(PropertyHashMap.java:275)
at jdk.nashorn.internal.runtime.PropertyMap.findProperty(PropertyMap.java:552)
at jdk.nashorn.internal.runtime.ScriptObject.findProperty(ScriptObject.java:814)
at jdk.nashorn.internal.runtime.ScriptObject.findProperty(ScriptObject.java:823)
at jdk.nashorn.internal.runtime.ScriptObject.findProperty(ScriptObject.java:790)
at jdk.nashorn.internal.runtime.ScriptObject.get(ScriptObject.java:3000)
at jdk.nashorn.internal.runtime.ScriptObject.get(ScriptObject.java:3020)
at jdk.nashorn.internal.runtime.JSONFunctions.walk(JSONFunctions.java:113)
at jdk.nashorn.internal.runtime.JSONFunctions.walk(JSONFunctions.java:120)
at jdk.nashorn.internal.runtime.JSONFunctions.walk(JSONFunctions.java:120)
at jdk.nashorn.internal.runtime.JSONFunctions.walk(JSONFunctions.java:120)
at jdk.nashorn.internal.runtime.JSONFunctions.walk(JSONFunctions.java:120)
at jdk.nashorn.internal.runtime.JSONFunctions.walk(JSONFunctions.java:120)
at jdk.nashorn.internal.runtime.JSONFunctions.walk(JSONFunctions.java:120)
at jdk.nashorn.internal.runtime.JSONFunctions.walk(JSONFunctions.java:120)
at jdk.nashorn.internal.runtime.JSONFunctions.walk(JSONFunctions.java:120)
at jdk.nashorn.internal.runtime.JSONFunctions.walk(JSONFunctions.java:120)
at jdk.nashorn.internal.runtime.JSONFunctions.walk(JSONFunctions.java:120)
at jdk.nashorn.internal.runtime.JSONFunctions.walk(JSONFunctions.java:120)
REGRESSION. Last worked in version 8u45
ERROR MESSAGES/STACK TRACES THAT OCCUR :
Exception in thread "main" java.lang.StackOverflowError
at jdk.nashorn.internal.runtime.PropertyHashMap.find(PropertyHashMap.java:275)
at jdk.nashorn.internal.runtime.PropertyMap.findProperty(PropertyMap.java:552)
at jdk.nashorn.internal.runtime.ScriptObject.findProperty(ScriptObject.java:814)
at jdk.nashorn.internal.runtime.ScriptObject.findProperty(ScriptObject.java:823)
at jdk.nashorn.internal.runtime.ScriptObject.findProperty(ScriptObject.java:790)
at jdk.nashorn.internal.runtime.ScriptObject.get(ScriptObject.java:3000)
at jdk.nashorn.internal.runtime.ScriptObject.get(ScriptObject.java:3020)
at jdk.nashorn.internal.runtime.JSONFunctions.walk(JSONFunctions.java:113)
at jdk.nashorn.internal.runtime.JSONFunctions.walk(JSONFunctions.java:120)
at jdk.nashorn.internal.runtime.JSONFunctions.walk(JSONFunctions.java:120)
at jdk.nashorn.internal.runtime.JSONFunctions.walk(JSONFunctions.java:120)
at jdk.nashorn.internal.runtime.JSONFunctions.walk(JSONFunctions.java:120)
at jdk.nashorn.internal.runtime.JSONFunctions.walk(JSONFunctions.java:120)
at jdk.nashorn.internal.runtime.JSONFunctions.walk(JSONFunctions.java:120)
at jdk.nashorn.internal.runtime.JSONFunctions.walk(JSONFunctions.java:120)
at jdk.nashorn.internal.runtime.JSONFunctions.walk(JSONFunctions.java:120)
at jdk.nashorn.internal.runtime.JSONFunctions.walk(JSONFunctions.java:120)
at jdk.nashorn.internal.runtime.JSONFunctions.walk(JSONFunctions.java:120)
at jdk.nashorn.internal.runtime.JSONFunctions.walk(JSONFunctions.java:120)
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import javax.script.ScriptEngine;
import javax.script.ScriptEngineManager;
import javax.script.ScriptException;
public class Look {
public static void main(String[] args) throws ScriptException {
ScriptEngine engine = new ScriptEngineManager().getEngineByName("js");
engine.eval("Object.prototype.merge = function(obj2){ return this; }");
engine.eval("function nothingTodo(k, v) {return v}");
engine.eval("JSON.parse('{\"name\" : \"jack\"}')");
engine.eval("JSON.parse('{\"name\" : \"jack\"}', nothingTodo)");
}
}
---------- END SOURCE ----------
java version "1.8.0_45"
Java(TM) SE Runtime Environment (build 1.8.0_45-b15)
Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Windows -7
A DESCRIPTION OF THE PROBLEM :
public static void main(String[] args) throws ScriptException {
ScriptEngine engine = new ScriptEngineManager().getEngineByName("js");
engine.eval("Object.prototype.merge = function(obj2){ return this; }");
engine.eval("function nothingTodo(k, v) {return v}");
engine.eval("JSON.parse('{\"name\" : \"jack\"}')");
// ^^^^^^^^^^^^ THAT IS OK
engine.eval("JSON.parse('{\"name\" : \"jack\"}', nothingTodo)");
// ^^^^^^^^^^^^ DEAD LOOP
}
Exception in thread "main" java.lang.StackOverflowError
at jdk.nashorn.internal.runtime.PropertyHashMap.find(PropertyHashMap.java:275)
at jdk.nashorn.internal.runtime.PropertyMap.findProperty(PropertyMap.java:552)
at jdk.nashorn.internal.runtime.ScriptObject.findProperty(ScriptObject.java:814)
at jdk.nashorn.internal.runtime.ScriptObject.findProperty(ScriptObject.java:823)
at jdk.nashorn.internal.runtime.ScriptObject.findProperty(ScriptObject.java:790)
at jdk.nashorn.internal.runtime.ScriptObject.get(ScriptObject.java:3000)
at jdk.nashorn.internal.runtime.ScriptObject.get(ScriptObject.java:3020)
at jdk.nashorn.internal.runtime.JSONFunctions.walk(JSONFunctions.java:113)
at jdk.nashorn.internal.runtime.JSONFunctions.walk(JSONFunctions.java:120)
at jdk.nashorn.internal.runtime.JSONFunctions.walk(JSONFunctions.java:120)
at jdk.nashorn.internal.runtime.JSONFunctions.walk(JSONFunctions.java:120)
at jdk.nashorn.internal.runtime.JSONFunctions.walk(JSONFunctions.java:120)
at jdk.nashorn.internal.runtime.JSONFunctions.walk(JSONFunctions.java:120)
at jdk.nashorn.internal.runtime.JSONFunctions.walk(JSONFunctions.java:120)
at jdk.nashorn.internal.runtime.JSONFunctions.walk(JSONFunctions.java:120)
at jdk.nashorn.internal.runtime.JSONFunctions.walk(JSONFunctions.java:120)
at jdk.nashorn.internal.runtime.JSONFunctions.walk(JSONFunctions.java:120)
at jdk.nashorn.internal.runtime.JSONFunctions.walk(JSONFunctions.java:120)
at jdk.nashorn.internal.runtime.JSONFunctions.walk(JSONFunctions.java:120)
REGRESSION. Last worked in version 8u45
ERROR MESSAGES/STACK TRACES THAT OCCUR :
Exception in thread "main" java.lang.StackOverflowError
at jdk.nashorn.internal.runtime.PropertyHashMap.find(PropertyHashMap.java:275)
at jdk.nashorn.internal.runtime.PropertyMap.findProperty(PropertyMap.java:552)
at jdk.nashorn.internal.runtime.ScriptObject.findProperty(ScriptObject.java:814)
at jdk.nashorn.internal.runtime.ScriptObject.findProperty(ScriptObject.java:823)
at jdk.nashorn.internal.runtime.ScriptObject.findProperty(ScriptObject.java:790)
at jdk.nashorn.internal.runtime.ScriptObject.get(ScriptObject.java:3000)
at jdk.nashorn.internal.runtime.ScriptObject.get(ScriptObject.java:3020)
at jdk.nashorn.internal.runtime.JSONFunctions.walk(JSONFunctions.java:113)
at jdk.nashorn.internal.runtime.JSONFunctions.walk(JSONFunctions.java:120)
at jdk.nashorn.internal.runtime.JSONFunctions.walk(JSONFunctions.java:120)
at jdk.nashorn.internal.runtime.JSONFunctions.walk(JSONFunctions.java:120)
at jdk.nashorn.internal.runtime.JSONFunctions.walk(JSONFunctions.java:120)
at jdk.nashorn.internal.runtime.JSONFunctions.walk(JSONFunctions.java:120)
at jdk.nashorn.internal.runtime.JSONFunctions.walk(JSONFunctions.java:120)
at jdk.nashorn.internal.runtime.JSONFunctions.walk(JSONFunctions.java:120)
at jdk.nashorn.internal.runtime.JSONFunctions.walk(JSONFunctions.java:120)
at jdk.nashorn.internal.runtime.JSONFunctions.walk(JSONFunctions.java:120)
at jdk.nashorn.internal.runtime.JSONFunctions.walk(JSONFunctions.java:120)
at jdk.nashorn.internal.runtime.JSONFunctions.walk(JSONFunctions.java:120)
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import javax.script.ScriptEngine;
import javax.script.ScriptEngineManager;
import javax.script.ScriptException;
public class Look {
public static void main(String[] args) throws ScriptException {
ScriptEngine engine = new ScriptEngineManager().getEngineByName("js");
engine.eval("Object.prototype.merge = function(obj2){ return this; }");
engine.eval("function nothingTodo(k, v) {return v}");
engine.eval("JSON.parse('{\"name\" : \"jack\"}')");
engine.eval("JSON.parse('{\"name\" : \"jack\"}', nothingTodo)");
}
}
---------- END SOURCE ----------
- backported by
-
JDK-8132516 after adding a function property to Object.prototype, JSON.parse with reviver function goes into infinite loop
- Resolved
-
JDK-8136311 after adding a function property to Object.prototype, JSON.parse with reviver function goes into infinite loop
- Resolved
-
JDK-8140958 after adding a function property to Object.prototype, JSON.parse with reviver function goes into infinite loop
- Resolved
-
JDK-8147327 after adding a function property to Object.prototype, JSON.parse with reviver function goes into infinite loop
- Resolved