RFR: JDK-8304684: Memory leak in DirectivesParser::set_option_flag [v2]

Justin King jcking at openjdk.org
Fri Mar 24 19:47:31 UTC 2023


On Fri, 24 Mar 2023 19:27:19 GMT, Justin King <jcking at openjdk.org> wrote:

>> Or maybe ~DirectiveSet could use the _modified array to decide if it should free the string flags.
>
> `DirectiveSet::compilecommand_compatibility_init` makes things even more complicated, because it doesnt update `_modified` and it should probably be making a copy of the string provided via `CompilerOracle::has_option_value`. Ugh...

Nevermind, it looks like `CompilerOracle::has_option_value` has static duration effectively. So I should be able to fix this.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/13125#discussion_r1147992934


More information about the hotspot-compiler-dev mailing list