RFR: 8257800: CompileCommand TypedMethodOptionMatcher::parse_method_pattern() may over consume [v8]

Christian Hagedorn chagedorn at openjdk.java.net
Tue Dec 15 09:58:03 UTC 2020


On Thu, 10 Dec 2020 20:43:17 GMT, Xin Liu <xliu at openjdk.org> wrote:

>> if users don't specify method_name in CompileCommand, hotspot will over consume a token.
>> in debug build, it may hit the assertion of type mismatch.
>
> Xin Liu has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains ten additional commits since the last revision:
> 
>  - Merge branch 'master' into JDK-8257800
>  - Merge branch 'master' into JDK-8257800
>  - fix a corner case. won't treat it as an error if it's dead of string.
>  - add the case -XX:CompileCommand=dontinline,*::dontinline_*" to the unittest
>  - Merge branch 'master' into JDK-8257800
>  - fix regression failure test/jdk/com/sun/jdi/EATests.java
>  - add a unittest to test over-consume situation
>  - fix building failure on Windows and chage parse_option_type to a public static member function.
>  - 8257800: CompileCommand TypedMethodOptionMatcher::parse_method_pattern() may over consume

src/hotspot/share/compiler/methodMatcher.cpp line 282:

> 280:       error_msg = "Did not specify any method name";
> 281:       m_match = MethodMatcher::Unknown;
> 282:       method_name[0] = '\0';

Why don't you just return here as in the error cases below? If you would do something like `-XX:CompileCommand=option,"*<",ccstrlist,ControlIntrinsic,+_id`, the error message would be overwritten below.

-------------

PR: https://git.openjdk.java.net/jdk/pull/1652


More information about the hotspot-compiler-dev mailing list