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

CompileCommand TypedMethodOptionMatcher::parse_method_pattern() may over consume

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b03
    • CPU:
      generic
    • OS:
      generic

      Backports

        Description

        if the method pattern is invalid, it may accidentally swallow the type.
        eg.

        $ ./build/linux-x86_64-server-fastdebug/jdk/bin/java -XX:CompileCommand="option,+/*,ccstrlist,ControlIntrinsic,+_fabs"
        # To suppress the following error report, specify this argument
        # after -XX: or in .hotspotrc: SuppressErrorAt=/compilerOracle.cpp:287
        #
        # A fatal error has been detected by the Java Runtime Environment:
        #
        # Internal Error (/backup/skara/jdk/src/hotspot/share/compiler/compilerOracle.cpp:287), pid=29158, tid=29159
        # assert(CompilerOracle::option_matches_type(option, value)) failed: Value must match option type
        #
        # JRE version: (16.0) (fastdebug build )
        # Java VM: OpenJDK 64-Bit Server VM (fastdebug 16-internal+0-adhoc.ubuntu.jdk, mixed mode, tiered, compressed oops, g1 gc, linux-amd64)
        # Problematic frame:
        # V [libjvm.so+0x96b624] void register_command<bool>(TypedMethodOptionMatcher*, CompileCommand, bool)+0x144
        #
        # Core dump will be written. Default location: Core dumps may be processed with "/usr/share/apport/apport %p %s %c %d %P %E" (or dumping to /backup/skara/jdk/core.29158)
        #
        # An error report file with more information is saved as:
        # /backup/skara/jdk/hs_err_pid29158.log
        #
        #
        Aborted (core dumped)

        or
        java -XX:CompileCommand="option,+/*,uintx,MaxNodeLimit,10"

        if the type has been consumed as method pattern, hotspot will assume the option is type-1.
        (1) CompileCommand=option,Klass::method,option

        It will hit assertion if the option type is not boolean in register_command.
          assert(CompilerOracle::option_matches_type(option, value), "Value must match option type");

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                xliu Xin Liu
                Reporter:
                xliu Xin Liu
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: