Fuzzing bug: AssertionError when defining local variable in Block

XMLWordPrintable

    • Type: Sub-task
    • Resolution: Fixed
    • Priority: P3
    • 9
    • Affects Version/s: 8u60
    • Component/s: core-libs
    • None
    • b42
    • generic
    • generic

        jjs> function f() { try{ undefined } catch(e if 1) {} } f()
        Exception in thread "main" java.lang.AssertionError
           at jdk.nashorn.internal.codegen.Label$Stack.defineBlockLocalVariable(Label.java:379)
           at jdk.nashorn.internal.codegen.MethodEmitter.defineBlockLocalVariable(MethodEmitter.java:1274)
           at jdk.nashorn.internal.codegen.CodeGeneratorLexicalContext.assignSlots(CodeGeneratorLexicalContext.java:242)
           at jdk.nashorn.internal.codegen.CodeGeneratorLexicalContext.onEnterBlock(CodeGeneratorLexicalContext.java:210)
           at jdk.nashorn.internal.codegen.CodeGenerator.initLocals(CodeGenerator.java:1671)
           at jdk.nashorn.internal.codegen.CodeGenerator.enterBlock(CodeGenerator.java:1113)
           at jdk.nashorn.internal.codegen.CodeGenerator.enterTryNode(CodeGenerator.java:3045)
           at jdk.nashorn.internal.ir.TryNode.accept(TryNode.java:110)
           at jdk.nashorn.internal.ir.Node.accept(Node.java:265)
           at jdk.nashorn.internal.ir.Block.accept(Block.java:178)
           ...

              Assignee:
              Attila Szegedi
              Reporter:
              Marcus Lagergren
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: