RFR: 8312596: Null pointer access in Compile::TracePhase::~TracePhase after JDK-8311976

Christian Hagedorn chagedorn at openjdk.org
Thu Jul 27 06:17:50 UTC 2023


On Mon, 24 Jul 2023 18:16:19 GMT, Ashutosh Mehra <duke 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.

You can put it in `compiler/c2` like the following test, which is also a sanity test for a C2 flag:
https://github.com/openjdk/jdk/blob/master/test/hotspot/jtreg/compiler/c2/TestVerifyGraphEdges.java
(You can drop `-Xbatch` which is implied by `-Xcomp`)

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

PR Comment: https://git.openjdk.org/jdk/pull/15002#issuecomment-1652973951


More information about the hotspot-compiler-dev mailing list