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

underscore_linker.js sample fails after dynalink changes for JDK-8168005

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • P3
    • Resolution: Fixed
    • 9
    • 9
    • core-libs
    • None
    • b143
    • generic
    • generic

    Description

      underscore_linker.js sample in $jdk9/nashorn/samples/dynalink/ directory fails after recent dynalink changes for JDK-8168005

      This sample didn't output anything after dynalink changes. After instrumenting underscore_linker.js to print $ERR, I got the following stack trace:

       jjs underscore_linker.js
      Exception in thread "main" java.lang.AssertionError: changeOperationInternal must not change the descriptor's class
              at jdk.dynalink.CallSiteDescriptor.alwaysAssert(jdk.dynalink@9-internal/CallSiteDescriptor.java:307)
              at jdk.dynalink.CallSiteDescriptor.assertChangeInvariants(jdk.dynalink@9-internal/CallSiteDescriptor.java:301)
              at jdk.dynalink.CallSiteDescriptor.changeOperation(jdk.dynalink@9-internal/CallSiteDescriptor.java:206)
              at UnderscoreNameLinkerExporter$1.getGuardedInvocation(UnderscoreNameLinkerExporter.java:95)
              at jdk.dynalink.linker.support.CompositeGuardingDynamicLinker.getGuardedInvocation(jdk.dynalink@9-internal/CompositeGuardingDynamicLinker.java:132)
              at jdk.dynalink.LinkerServicesImpl.lambda$getGuardedInvocation$0(jdk.dynalink@9-internal/LinkerServicesImpl.java:160)
              at jdk.dynalink.LinkerServicesImpl.getWithLookupInternal(jdk.dynalink@9-internal/LinkerServicesImpl.java:191)
              at jdk.dynalink.LinkerServicesImpl.getGuardedInvocation(jdk.dynalink@9-internal/LinkerServicesImpl.java:158)
              at jdk.dynalink.DynamicLinker.relink(jdk.dynalink@9-internal/DynamicLinker.java:265)
              at jdk.nashorn.internal.scripts.Script$Recompilation$2$underscore$cu1$restOf.:program(jdk.scripting.nashorn.scripts/underscore.js:39)
              at jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(jdk.scripting.nashorn@9-internal/ScriptFunctionData.java:652)
              at jdk.nashorn.internal.runtime.ScriptFunction.invoke(jdk.scripting.nashorn@9-internal/ScriptFunction.java:513)
              at jdk.nashorn.internal.runtime.ScriptRuntime.apply(jdk.scripting.nashorn@9-internal/ScriptRuntime.java:489)
              at jdk.nashorn.tools.Shell.apply(jdk.scripting.nashorn@9-internal/Shell.java:519)
              at jdk.nashorn.tools.Shell.runScripts(jdk.scripting.nashorn@9-internal/Shell.java:448)
              at jdk.nashorn.tools.Shell.run(jdk.scripting.nashorn@9-internal/Shell.java:186)
              at jdk.nashorn.tools.jjs.Main.main(jdk.scripting.nashorn.shell@9-internal/Main.java:104)
              at jdk.nashorn.tools.jjs.Main.main(jdk.scripting.nashorn.shell@9-internal/Main.java:80)

      pluggable dynalink underscore name linker loaded

      Attachments

        Issue Links

          Activity

            People

              sundar Sundararajan Athijegannathan
              sundar Sundararajan Athijegannathan
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: