RFR: 8312596: Null pointer access in Compile::TracePhase::~TracePhase after JDK-8311976
Ashutosh Mehra
duke at openjdk.org
Wed Jul 26 19:36:50 UTC 2023
On Tue, 25 Jul 2023 10:24:01 GMT, Christian Hagedorn <chagedorn at openjdk.org> wrote:
>> Please review this PR to fix a potential null pointer access in using `_compile`.
>> Updated the code to unconditionally initialize `_compile` and added an assert (similar to C1's `PhaseTraceTime` constructor) for it to be non-null.
>
> I suggest to remove the word "potential" in the bug title because we can trigger the null pointer with
>
> java -XX:+PrintIdealNodeCount --version
>
> Maybe you also want to add a Hello World like sanity test with `-XX:+PrintIdealNodeCount`.
>
> Otherwise, the fix looks good.
@chhagedorn any suggestion where to add the sanity test with `-XX:+PrintIdealNodeCount`? Is there an existing test that I can piggyback on?
-------------
PR Comment: https://git.openjdk.org/jdk/pull/15002#issuecomment-1652375650
More information about the hotspot-compiler-dev
mailing list