Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8149451

fix bytecode generation issue after 8149186

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3
    • 9
    • None
    • core-libs
    • None

    Description

      With the changes for JDK-8149186, errors in the nightly build were observed in running test262parallel. Running test262parallel on Linux led to reproducible errors as well. They are of the nature shown below. Investigation indicates the return type of a FunctionNode is erroneously null.

           [java] java.lang.AssertionError: Failed generating bytecode for test/script/external/test262/test/suite/ch10/10.2/10.2.1/S10.2.1_A1.js:-1
           [java] at jdk.nashorn.internal.codegen.CompilationPhase$BytecodeGenerationPhase.transform(CompilationPhase.java:436)
           [java] at jdk.nashorn.internal.codegen.CompilationPhase.apply(CompilationPhase.java:630)
           [java] at jdk.nashorn.internal.codegen.Compiler.compile(Compiler.java:656)
           [java] at jdk.nashorn.internal.runtime.RecompilableScriptFunctionData.compileTypeSpecialization(RecompilableScriptFunctionData.java:717)
           [java] at jdk.nashorn.internal.runtime.RecompilableScriptFunctionData.getBest(RecompilableScriptFunctionData.java:897)
           [java] at jdk.nashorn.internal.runtime.ScriptFunctionData.getBest(ScriptFunctionData.java:392)
           [java] at jdk.nashorn.internal.runtime.ScriptFunctionData.getBestInvoker(ScriptFunctionData.java:254)
           [java] at jdk.nashorn.internal.runtime.ScriptFunction.findCallMethod(ScriptFunction.java:915)
           [java] at jdk.nashorn.internal.runtime.ScriptObject.lookup(ScriptObject.java:1862)
           [java] at jdk.nashorn.internal.runtime.linker.NashornLinker.getGuardedInvocation(NashornLinker.java:102)
           [java] at jdk.nashorn.internal.runtime.linker.NashornLinker.getGuardedInvocation(NashornLinker.java:94)
           [java] at jdk.dynalink.linker.support.CompositeTypeBasedGuardingDynamicLinker.getGuardedInvocation(CompositeTypeBasedGuardingDynamicLinker.java:184)
           [java] at jdk.dynalink.linker.support.CompositeGuardingDynamicLinker.getGuardedInvocation(CompositeGuardingDynamicLinker.java:132)
           [java] at jdk.dynalink.LinkerServicesImpl.getGuardedInvocation(LinkerServicesImpl.java:146)
           [java] at jdk.dynalink.DynamicLinker.relink(DynamicLinker.java:262)
           [java] at jdk.nashorn.internal.scripts.Script$Recompilation$57845$S10_2_1_A1.:program(test/script/external/test262/test/suite/ch10/10.2/10.2.1/S10.2.1_A1.js:26)
           [java] at jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:654)
           [java] at jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:511)
           [java] at jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:393)
           [java] at jdk.nashorn.internal.test.framework.SharedContextEvaluator.run(SharedContextEvaluator.java:135)
           [java] at jdk.nashorn.internal.test.framework.AbstractScriptRunnable.evaluateScript(AbstractScriptRunnable.java:200)
           [java] at jdk.nashorn.internal.test.framework.ParallelTestRunner$ScriptRunnable.execute(ParallelTestRunner.java:202)
           [java] at jdk.nashorn.internal.test.framework.AbstractScriptRunnable.runTest(AbstractScriptRunnable.java:132)
           [java] at jdk.nashorn.internal.test.framework.ParallelTestRunner$ScriptRunnable.call(ParallelTestRunner.java:281)
           [java] at jdk.nashorn.internal.test.framework.ParallelTestRunner$ScriptRunnable.call(ParallelTestRunner.java:124)
           [java] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
           [java] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1158)
           [java] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:632)
           [java] at java.lang.Thread.run(Thread.java:804)
           [java] Caused by: java.lang.NullPointerException
           [java] at jdk.internal.org.objectweb.asm.Type.getMethodDescriptor(Type.java:678)
           [java] at jdk.nashorn.internal.codegen.types.Type.getMethodDescriptor(Type.java:196)
           [java] at jdk.nashorn.internal.codegen.FunctionSignature.<init>(FunctionSignature.java:137)
           [java] at jdk.nashorn.internal.codegen.FunctionSignature.<init>(FunctionSignature.java:67)
           [java] at jdk.nashorn.internal.codegen.FunctionSignature.<init>(FunctionSignature.java:154)
           [java] at jdk.nashorn.internal.codegen.ClassEmitter.method(ClassEmitter.java:551)
           [java] at jdk.nashorn.internal.codegen.CodeGenerator.enterFunctionNode(CodeGenerator.java:2100)
           [java] at jdk.nashorn.internal.ir.FunctionNode.accept(FunctionNode.java:342)
           [java] at jdk.nashorn.internal.ir.LexicalContextNode$Acceptor.accept(LexicalContextNode.java:57)
           [java] at jdk.nashorn.internal.ir.LexicalContextExpression.accept(LexicalContextExpression.java:47)
           [java] at jdk.nashorn.internal.ir.FunctionNode.accept(FunctionNode.java:56)
           [java] at jdk.nashorn.internal.codegen.CompilationPhase.transformFunction(CompilationPhase.java:634)
           [java] at jdk.nashorn.internal.codegen.CompilationPhase.access$100(CompilationPhase.java:55)
           [java] at jdk.nashorn.internal.codegen.CompilationPhase$BytecodeGenerationPhase.transform(CompilationPhase.java:423)
           [java] ... 28 more
           [java] Test(compile, run): test/script/external/test262/test/suite/ch10/10.2/10.2.1/S10.2.1_A3.js
           [java] java.lang.AssertionError: Failed generating bytecode for test/script/external/test262/test/suite/ch10/10.2/10.2.1/S10.2.1_A3.js:-1
           [java] at jdk.nashorn.internal.codegen.CompilationPhase$BytecodeGenerationPhase.transform(CompilationPhase.java:436)
           [java] at jdk.nashorn.internal.codegen.CompilationPhase.apply(CompilationPhase.java:630)
           [java] at jdk.nashorn.internal.codegen.Compiler.compile(Compiler.java:656)
           [java] at jdk.nashorn.internal.runtime.RecompilableScriptFunctionData.compileTypeSpecialization(RecompilableScriptFunctionData.java:717)
           [java] at jdk.nashorn.internal.runtime.RecompilableScriptFunctionData.getBest(RecompilableScriptFunctionData.java:897)
           [java] at jdk.nashorn.internal.runtime.ScriptFunctionData.getBest(ScriptFunctionData.java:392)
           [java] at jdk.nashorn.internal.runtime.ScriptFunctionData.getBestInvoker(ScriptFunctionData.java:254)
           [java] at jdk.nashorn.internal.runtime.ScriptFunction.findCallMethod(ScriptFunction.java:915)
           [java] at jdk.nashorn.internal.runtime.ScriptObject.lookup(ScriptObject.java:1862)
           [java] at jdk.nashorn.internal.runtime.linker.NashornLinker.getGuardedInvocation(NashornLinker.java:102)
           [java] at jdk.nashorn.internal.runtime.linker.NashornLinker.getGuardedInvocation(NashornLinker.java:94)
           [java] at jdk.dynalink.linker.support.CompositeTypeBasedGuardingDynamicLinker.getGuardedInvocation(CompositeTypeBasedGuardingDynamicLinker.java:184)
           [java] at jdk.dynalink.linker.support.CompositeGuardingDynamicLinker.getGuardedInvocation(CompositeGuardingDynamicLinker.java:132)
           [java] at jdk.dynalink.LinkerServicesImpl.getGuardedInvocation(LinkerServicesImpl.java:146)
           [java] at jdk.dynalink.DynamicLinker.relink(DynamicLinker.java:262)
           [java] at jdk.nashorn.internal.scripts.Script$Recompilation$58003$S10_2_1_A3.:program(test/script/external/test262/test/suite/ch10/10.2/10.2.1/S10.2.1_A3.js:18)
           [java] at jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:654)
           [java] at jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:511)
           [java] at jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:393)
           [java] at jdk.nashorn.internal.test.framework.SharedContextEvaluator.run(SharedContextEvaluator.java:135)
           [java] at jdk.nashorn.internal.test.framework.AbstractScriptRunnable.evaluateScript(AbstractScriptRunnable.java:200)
           [java] at jdk.nashorn.internal.test.framework.ParallelTestRunner$ScriptRunnable.execute(ParallelTestRunner.java:202)
           [java] at jdk.nashorn.internal.test.framework.AbstractScriptRunnable.runTest(AbstractScriptRunnable.java:132)
           [java] at jdk.nashorn.internal.test.framework.ParallelTestRunner$ScriptRunnable.call(ParallelTestRunner.java:281)
           [java] at jdk.nashorn.internal.test.framework.ParallelTestRunner$ScriptRunnable.call(ParallelTestRunner.java:124)
           [java] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
           [java] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1158)
           [java] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:632)
           [java] at java.lang.Thread.run(Thread.java:804)
           [java] Caused by: java.lang.NullPointerException
           [java] at jdk.internal.org.objectweb.asm.Type.getMethodDescriptor(Type.java:678)
           [java] at jdk.nashorn.internal.codegen.types.Type.getMethodDescriptor(Type.java:196)
           [java] at jdk.nashorn.internal.codegen.FunctionSignature.<init>(FunctionSignature.java:137)
           [java] at jdk.nashorn.internal.codegen.FunctionSignature.<init>(FunctionSignature.java:67)
           [java] at jdk.nashorn.internal.codegen.FunctionSignature.<init>(FunctionSignature.java:154)
           [java] at jdk.nashorn.internal.codegen.ClassEmitter.method(ClassEmitter.java:551)
           [java] at jdk.nashorn.internal.codegen.CodeGenerator.enterFunctionNode(CodeGenerator.java:2100)
           [java] at jdk.nashorn.internal.ir.FunctionNode.accept(FunctionNode.java:342)
           [java] at jdk.nashorn.internal.ir.LexicalContextNode$Acceptor.accept(LexicalContextNode.java:57)
           [java] at jdk.nashorn.internal.ir.LexicalContextExpression.accept(LexicalContextExpression.java:47)
           [java] at jdk.nashorn.internal.ir.FunctionNode.accept(FunctionNode.java:56)
           [java] at jdk.nashorn.internal.codegen.CompilationPhase.transformFunction(CompilationPhase.java:634)
           [java] at jdk.nashorn.internal.codegen.CompilationPhase.access$100(CompilationPhase.java:55)
           [java] at jdk.nashorn.internal.codegen.CompilationPhase$BytecodeGenerationPhase.transform(CompilationPhase.java:423)
           [java] ... 28 more

      Attachments

        Issue Links

          Activity

            People

              attila Attila Szegedi
              mhaupt Michael Haupt
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: