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

Remove bad assert in ClassFileParser.cpp

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b12

      Description

      This assert in ClassFileParser::parse_classfile_bootstrap_methods_attribute() should be removed because it can be triggered by invalid bytecodes, not just by a JVM inconsistency.

        assert(operand_fill_index == operands->length(), "exact fill");

      If, for example, the class file contains an incorrect num_boostrap_arguments value for the Bootstrap_methods attribute then the assertion will trigger.

      The assert should be removed, enabling ClassFormatError exception to be thrown instead.

      The problem can be reproduced with the attached LambdaMath.class file when run against a fast-debug hotspot build.

        Attachments

          Activity

            People

            Assignee:
            hseigel Harold Seigel
            Reporter:
            hseigel Harold Seigel
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: