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

Emanuel Peter epeter at openjdk.org
Mon Nov 17 08:02:02 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>

Sorry, missed the swap from "Comment" to "Approve" 🙈

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

Marked as reviewed by epeter (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/28323#pullrequestreview-3471424230


More information about the hotspot-compiler-dev mailing list