Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8042304 Fuzzing jdk9/dev/nashorn
  3. JDK-8047064

eval.apply.apply(function(){ eval('') }) crashes with IndexOutOfBoundsException

    XMLWordPrintable

    Details

    • Type: Sub-task
    • Status: Resolved
    • Priority: P3
    • Resolution: Duplicate
    • Affects Version/s: 9
    • Fix Version/s: None
    • Component/s: core-libs
    • Labels:
      None

      Description

       jjs -J-Djava.ext.dirs=$jdk9_dev/nashorn/dist -doe

      jjs> eval.apply.apply(function(){ eval('') })
      java.lang.IndexOutOfBoundsException: start=4 end=3
      java.lang.IndexOutOfBoundsException: start=4 end=3
      at java.lang.invoke.MethodType.newIndexOutOfBoundsException(MethodType.java:189)
      at java.lang.invoke.MethodType.dropParameterTypes(MethodType.java:482)
      at jdk.internal.dynalink.support.Guards.getTestType(Guards.java:247)
      at jdk.internal.dynalink.support.Guards.asType(Guards.java:243)
      at jdk.internal.dynalink.linker.GuardedInvocation.asTypeSafeReturn(GuardedInvocation.java:341)
      at jdk.nashorn.internal.runtime.linker.Bootstrap.asTypeSafeReturn(Bootstrap.java:407)
      at jdk.nashorn.internal.runtime.linker.NashornLinker.getGuardedInvocation(NashornLinker.java:94)
      at jdk.internal.dynalink.support.CompositeTypeBasedGuardingDynamicLinker.getGuardedInvocation(CompositeTypeBasedGuardingDynamicLinker.java:176)
      at jdk.internal.dynalink.support.CompositeGuardingDynamicLinker.getGuardedInvocation(CompositeGuardingDynamicLinker.java:124)
      at jdk.internal.dynalink.support.LinkerServicesImpl.getGuardedInvocation(LinkerServicesImpl.java:149)
      at jdk.internal.dynalink.DynamicLinker.relink(DynamicLinker.java:233)
      at jdk.nashorn.internal.scripts.Script$1$\^shell\_.: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)

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              attila Attila Szegedi
              Reporter:
              sundar Sundararajan Athijegannathan
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: