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

Nashorn: IndexOutOfBoundsException in NashornCallSiteDescriptor.getNameToken()

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 9
    • 8u20
    • core-libs
    • b02
    • linux_ubuntu

        FULL PRODUCT VERSION :


        A DESCRIPTION OF THE PROBLEM :
        IndexOutOfBoundsException in NashornCallSiteDescriptor.getNameToken() when accessing a property of java.lang.Class instance. Only applies to jjssecure.

        Nashorn version: hg tip 18edd7a1b166

        ADDITIONAL REGRESSION INFORMATION:
        Java(TM) SE Runtime Environment (build 1.8.0-ea-b119)
        Java HotSpot(TM) 64-Bit Server VM (build 25.0-b61, mixed mode)

        STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
        jjs> try{ for(;;)void Array.apply(null,Array(0xffff)).map(function(){return 0}).sort(function(){return Math.random()>.5 ? 1 : -1}) }catch(e){cl = e.getClass()}
        class java.lang.IllegalArgumentException
        jjs> try { cl["forName"] } catch(e) { e.printStackTrace() }
        java.lang.IndexOutOfBoundsException: 2
        at jdk.nashorn.internal.runtime.linker.NashornCallSiteDescriptor.getNameToken(NashornCallSiteDescriptor.java:145)
        at jdk.nashorn.internal.runtime.linker.ReflectionCheckLinker.checkLinkRequest(ReflectionCheckLinker.java:78)
        at jdk.nashorn.internal.runtime.linker.ReflectionCheckLinker.getGuardedInvocation(ReflectionCheckLinker.java:57)
        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:138)
        at jdk.internal.dynalink.DynamicLinker.relink(DynamicLinker.java:232)
        at jdk.nashorn.internal.scripts.Script$\^shell\_.runScript(<shell>:1)
        at jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:498)
        at jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:207)
        at jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:378)
        at jdk.nashorn.internal.runtime.Context.eval(Context.java:475)
        at jdk.nashorn.tools.Shell.readEvalPrint(Shell.java:439)
        at jdk.nashorn.tools.Shell.run(Shell.java:155)
        at jdk.nashorn.tools.Shell.main(Shell.java:130)
        at jdk.nashorn.tools.Shell.main(Shell.java:109)


        REPRODUCIBILITY :
        This bug can be reproduced always.

              sundar Sundararajan Athijegannathan
              webbuggrp Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: