RFR: 8257800: CompileCommand TypedMethodOptionMatcher::parse_method_pattern() may over consume

Xin Liu xliu at openjdk.java.net
Mon Dec 7 00:26:14 UTC 2020


On Sun, 6 Dec 2020 23:45:21 GMT, Claes Redestad <redestad 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.
>
> src/hotspot/share/compiler/methodMatcher.cpp line 241:
> 
>> 239: }
>> 240: 
>> 241: enum OptionType parse_option_type(const char* type_str);
> 
> Hmm, rather than a surprising forward declaration to a method declared in compilerOracle.cpp (does this actually work?) maybe declare that method publically as `CompilerOracle::parse_option_type` and call that?

yes, it's a forward declaration.  I guess some recursive headers include compilerOracle.hpp(precompiled.hpp?) I will declare it as a public static member function like `CompilerOracle::string_to_option`

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

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


More information about the hotspot-compiler-dev mailing list