-
Sub-task
-
Resolution: Fixed
-
P3
-
9
-
None
-
b39
-
generic
-
generic
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8085778 | emb-9 | Hannes Wallnoefer | P3 | Resolved | Fixed | team |
JDK-8087077 | 8u65 | Hannes Wallnoefer | P3 | Resolved | Fixed | b01 |
JDK-8080414 | 8u60 | Hannes Wallnoefer | P3 | Resolved | Fixed | b16 |
JDK-8138471 | emb-8u65 | Unassigned | P3 | Resolved | Fixed | b01 |
JDK-8081201 | emb-8u60 | Hannes Wallnoefer | P3 | Resolved | Fixed | team |
This example forms a long name for a function. Can we have graceful failure or handle it somehow?
jjs -J-Djava.ext.dirs=$jdk9-dev/nashorn/dist/
jjs> eval("function " + Array.apply(null,Array(0x10000)).join("a") + "(){}")
Exception in thread "main" java.lang.AssertionError: Failed generating bytecode for <shell>#1:1<eval>@1:1
at jdk.nashorn.internal.codegen.CompilationPhase$11.transform(CompilationPhase.java:448)
at jdk.nashorn.internal.codegen.CompilationPhase.apply(CompilationPhase.java:685)
at jdk.nashorn.internal.codegen.Compiler.compile(Compiler.java:506)
at jdk.nashorn.internal.runtime.Context.compile(Context.java:1106)
at jdk.nashorn.internal.runtime.Context.eval(Context.java:580)
at jdk.nashorn.internal.objects.Global.directEval(Global.java:886)
at jdk.nashorn.internal.scripts.Script$Recompilation$2$\^shell\_$cu2$restOf.:program(<shell>:1)
at jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:567)
at jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:221)
at jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:374)
at jdk.nashorn.internal.runtime.Context.eval(Context.java:620)
at jdk.nashorn.tools.Shell.readEvalPrint(Shell.java:448)
at jdk.nashorn.tools.Shell.run(Shell.java:158)
at jdk.nashorn.tools.Shell.main(Shell.java:133)
at jdk.nashorn.tools.Shell.main(Shell.java:112)
Caused by: java.lang.IllegalArgumentException
at jdk.internal.org.objectweb.asm.ByteVector.putUTF8(ByteVector.java:242)
at jdk.internal.org.objectweb.asm.ClassWriter.newUTF8(ClassWriter.java:1102)
at jdk.internal.org.objectweb.asm.ClassWriter.newNameTypeItem(ClassWriter.java:1572)
at jdk.internal.org.objectweb.asm.ClassWriter.newNameType(ClassWriter.java:1555)
at jdk.internal.org.objectweb.asm.ClassWriter.newInvokeDynamicItem(ClassWriter.java:1326)
at jdk.internal.org.objectweb.asm.MethodWriter.visitInvokeDynamicInsn(MethodWriter.java:969)
at jdk.nashorn.internal.codegen.MethodEmitter.dynamicSet(MethodEmitter.java:2252)
at jdk.nashorn.internal.codegen.CodeGenerator.storeFastScopeVar(CodeGenerator.java:470)
at jdk.nashorn.internal.codegen.CodeGenerator.enterVarNode(CodeGenerator.java:3194)
at jdk.nashorn.internal.ir.VarNode.accept(VarNode.java:125)
at jdk.nashorn.internal.ir.Node.accept(Node.java:268)
at jdk.nashorn.internal.ir.Block.accept(Block.java:152)
at jdk.nashorn.internal.ir.LexicalContextNode$Acceptor.accept(LexicalContextNode.java:57)
at jdk.nashorn.internal.ir.Block.accept(Block.java:386)
at jdk.nashorn.internal.ir.SplitNode.accept(SplitNode.java:94)
at jdk.nashorn.internal.ir.LexicalContextNode$Acceptor.accept(LexicalContextNode.java:57)
at jdk.nashorn.internal.ir.LexicalContextStatement.accept(LexicalContextStatement.java:53)
at jdk.nashorn.internal.ir.SplitNode.accept(SplitNode.java:41)
at jdk.nashorn.internal.ir.Node.accept(Node.java:268)
at jdk.nashorn.internal.ir.Block.accept(Block.java:152)
at jdk.nashorn.internal.ir.LexicalContextNode$Acceptor.accept(LexicalContextNode.java:57)
at jdk.nashorn.internal.ir.Block.accept(Block.java:386)
at jdk.nashorn.internal.ir.FunctionNode.accept(FunctionNode.java:351)
at jdk.nashorn.internal.ir.LexicalContextNode$Acceptor.accept(LexicalContextNode.java:57)
at jdk.nashorn.internal.ir.LexicalContextExpression.accept(LexicalContextExpression.java:46)
at jdk.nashorn.internal.ir.FunctionNode.accept(FunctionNode.java:52)
at jdk.nashorn.internal.codegen.CompilationPhase$11.transform(CompilationPhase.java:435)
... 14 more
jjs -J-Djava.ext.dirs=$jdk9-dev/nashorn/dist/
jjs> eval("function " + Array.apply(null,Array(0x10000)).join("a") + "(){}")
Exception in thread "main" java.lang.AssertionError: Failed generating bytecode for <shell>#1:1<eval>@1:1
at jdk.nashorn.internal.codegen.CompilationPhase$11.transform(CompilationPhase.java:448)
at jdk.nashorn.internal.codegen.CompilationPhase.apply(CompilationPhase.java:685)
at jdk.nashorn.internal.codegen.Compiler.compile(Compiler.java:506)
at jdk.nashorn.internal.runtime.Context.compile(Context.java:1106)
at jdk.nashorn.internal.runtime.Context.eval(Context.java:580)
at jdk.nashorn.internal.objects.Global.directEval(Global.java:886)
at jdk.nashorn.internal.scripts.Script$Recompilation$2$\^shell\_$cu2$restOf.:program(<shell>:1)
at jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:567)
at jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:221)
at jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:374)
at jdk.nashorn.internal.runtime.Context.eval(Context.java:620)
at jdk.nashorn.tools.Shell.readEvalPrint(Shell.java:448)
at jdk.nashorn.tools.Shell.run(Shell.java:158)
at jdk.nashorn.tools.Shell.main(Shell.java:133)
at jdk.nashorn.tools.Shell.main(Shell.java:112)
Caused by: java.lang.IllegalArgumentException
at jdk.internal.org.objectweb.asm.ByteVector.putUTF8(ByteVector.java:242)
at jdk.internal.org.objectweb.asm.ClassWriter.newUTF8(ClassWriter.java:1102)
at jdk.internal.org.objectweb.asm.ClassWriter.newNameTypeItem(ClassWriter.java:1572)
at jdk.internal.org.objectweb.asm.ClassWriter.newNameType(ClassWriter.java:1555)
at jdk.internal.org.objectweb.asm.ClassWriter.newInvokeDynamicItem(ClassWriter.java:1326)
at jdk.internal.org.objectweb.asm.MethodWriter.visitInvokeDynamicInsn(MethodWriter.java:969)
at jdk.nashorn.internal.codegen.MethodEmitter.dynamicSet(MethodEmitter.java:2252)
at jdk.nashorn.internal.codegen.CodeGenerator.storeFastScopeVar(CodeGenerator.java:470)
at jdk.nashorn.internal.codegen.CodeGenerator.enterVarNode(CodeGenerator.java:3194)
at jdk.nashorn.internal.ir.VarNode.accept(VarNode.java:125)
at jdk.nashorn.internal.ir.Node.accept(Node.java:268)
at jdk.nashorn.internal.ir.Block.accept(Block.java:152)
at jdk.nashorn.internal.ir.LexicalContextNode$Acceptor.accept(LexicalContextNode.java:57)
at jdk.nashorn.internal.ir.Block.accept(Block.java:386)
at jdk.nashorn.internal.ir.SplitNode.accept(SplitNode.java:94)
at jdk.nashorn.internal.ir.LexicalContextNode$Acceptor.accept(LexicalContextNode.java:57)
at jdk.nashorn.internal.ir.LexicalContextStatement.accept(LexicalContextStatement.java:53)
at jdk.nashorn.internal.ir.SplitNode.accept(SplitNode.java:41)
at jdk.nashorn.internal.ir.Node.accept(Node.java:268)
at jdk.nashorn.internal.ir.Block.accept(Block.java:152)
at jdk.nashorn.internal.ir.LexicalContextNode$Acceptor.accept(LexicalContextNode.java:57)
at jdk.nashorn.internal.ir.Block.accept(Block.java:386)
at jdk.nashorn.internal.ir.FunctionNode.accept(FunctionNode.java:351)
at jdk.nashorn.internal.ir.LexicalContextNode$Acceptor.accept(LexicalContextNode.java:57)
at jdk.nashorn.internal.ir.LexicalContextExpression.accept(LexicalContextExpression.java:46)
at jdk.nashorn.internal.ir.FunctionNode.accept(FunctionNode.java:52)
at jdk.nashorn.internal.codegen.CompilationPhase$11.transform(CompilationPhase.java:435)
... 14 more
- backported by
-
JDK-8080414 Very long function names break codegen
- Resolved
-
JDK-8081201 Very long function names break codegen
- Resolved
-
JDK-8085778 Very long function names break codegen
- Resolved
-
JDK-8087077 Very long function names break codegen
- Resolved
-
JDK-8138471 Very long function names break codegen
- Resolved
- duplicates
-
JDK-8080385 eval("function " + Array.apply(null,Array(0x10000)).join("a") + "(){}") crashes in codegen
- Closed
(1 duplicates)