Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8024971 Fuzzing results on nashorn by Andre
  3. JDK-8025048

true as case label results in ClassCastException

    XMLWordPrintable

Details

    • Sub-task
    • Status: Resolved
    • P3
    • Resolution: Fixed
    • 8
    • 8
    • core-libs
    • None
    • b110
    • generic
    • generic

    Description

      function func(x) {
          switch(x) {
           case 8: break; case true:
          }
      }

      results in ClassCastException in code gen.

      Exception in thread "main" java.lang.ClassCastException: java.lang.Boolean cannot be cast to java.lang.Integer
      at jdk.nashorn.internal.codegen.CodeGenerator.enterSwitchNode(CodeGenerator.java:1835)
      at jdk.nashorn.internal.ir.SwitchNode.accept(SwitchNode.java:103)
      at jdk.nashorn.internal.ir.LexicalContextNode$Acceptor.accept(LexicalContextNode.java:57)
      at jdk.nashorn.internal.ir.LexicalContextStatement.accept(LexicalContextStatement.java:53)
      at jdk.nashorn.internal.ir.SwitchNode.accept(SwitchNode.java:38)
      at jdk.nashorn.internal.ir.Node.accept(Node.java:291)
      at jdk.nashorn.internal.ir.Block.accept(Block.java:143)
      at jdk.nashorn.internal.ir.LexicalContextNode$Acceptor.accept(LexicalContextNode.java:57)
      at jdk.nashorn.internal.ir.Block.accept(Block.java:361)
      at jdk.nashorn.internal.ir.FunctionNode.accept(FunctionNode.java:297)
      at jdk.nashorn.internal.ir.LexicalContextNode$Acceptor.accept(LexicalContextNode.java:57)
      at jdk.nashorn.internal.ir.LexicalContextExpression.accept(LexicalContextExpression.java:46)
      [... frames deleted...]


      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: