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

Remove bad assert in ClassFileParser.cpp

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4
    • 9
    • 9
    • hotspot
    • None
    • 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

            hseigel Harold Seigel (Inactive)
            hseigel Harold Seigel (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: