RFR: 8371881: C2: Fix potential SEGV in VTransformReductionVectorNode tracing [v2]

duke duke at openjdk.org
Mon Nov 17 10:26:33 UTC 2025


On Fri, 14 Nov 2025 15:59:32 GMT, Vishal Chand <duke at openjdk.org> wrote:

>> This PR fixes a potential SEGV and removes dead code:
>> • **Fix**: Prevent potential SEGV in VTransformReductionVectorNode - [from @shipilev] This fixes a crash in diagnostic code when isa_ReductionVector() unexpectedly returns nullptr. While this indicates the graph is already corrupted, the additional crash in `TRACE_OPTIMIZE` makes debugging harder. The fix adds defensive null checking to prevent the diagnostic crash and improve error handling.
>> 
>> • **Cleanup**: Remove unused first_red variable
>
> Vishal Chand has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Update src/hotspot/share/opto/vtransform.cpp
>   
>   Co-authored-by: Aleksey Shipilëv <shipilev at amazon.de>

@vish-chan 
Your change (at version 0824593d2a6f4f4ec2ad5f42d303428962866a5a) is now ready to be sponsored by a Committer.

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

PR Comment: https://git.openjdk.org/jdk/pull/28323#issuecomment-3540991934


More information about the hotspot-compiler-dev mailing list