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

(function() "hello")() crashes in Lexer with jdk9

    XMLWordPrintable

    Details

    • Type: Sub-task
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: core-libs
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b20
    • CPU:
      generic
    • OS:
      generic

      Backports

        Description

         jjs -J-Djava.ext.dirs=$jdk9_dev/nashorn/dist/ jjs> (function() "hello")();
        jdk.nashorn.internal.runtime.ParserException: <shell>:1:18 Missing close quote
        (function() "hello")();
                          ^
        jdk.nashorn.internal.runtime.ParserException: <shell>:1:18 Missing close quote
        (function() "hello")();
                          ^
        at jdk.nashorn.internal.parser.Lexer.error(Lexer.java:1697)
        at jdk.nashorn.internal.parser.Lexer.scanString(Lexer.java:995)
        at jdk.nashorn.internal.parser.Lexer.lexify(Lexer.java:1606)
        at jdk.nashorn.internal.parser.AbstractParser.getToken(AbstractParser.java:132)
        at jdk.nashorn.internal.parser.AbstractParser.nextToken(AbstractParser.java:211)
        at jdk.nashorn.internal.parser.AbstractParser.nextOrEOL(AbstractParser.java:170)
        at jdk.nashorn.internal.parser.AbstractParser.next(AbstractParser.java:157)
        at jdk.nashorn.internal.parser.Parser.parse(Parser.java:271)
        at jdk.nashorn.internal.runtime.RecompilableScriptFunctionData.reparse(RecompilableScriptFunctionData.java:363)
        at jdk.nashorn.internal.runtime.RecompilableScriptFunctionData.compileTypeSpecialization(RecompilableScriptFunctionData.java:417)
        at jdk.nashorn.internal.runtime.RecompilableScriptFunctionData.getBest(RecompilableScriptFunctionData.java:558)
        at jdk.nashorn.internal.runtime.ScriptFunctionData.getBestInvoker(ScriptFunctionData.java:229)
        at jdk.nashorn.internal.runtime.ScriptFunction.findCallMethod(ScriptFunction.java:546)
        at jdk.nashorn.internal.runtime.ScriptObject.lookup(ScriptObject.java:1791)
        at jdk.nashorn.internal.runtime.linker.NashornLinker.getGuardedInvocation(NashornLinker.java:100)
        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:
                sundar Sundararajan Athijegannathan
                Reporter:
                sundar Sundararajan Athijegannathan
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: