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

Vishal Chand duke at openjdk.org
Fri Nov 14 15:59:32 UTC 2025


> 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>

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/28323/files
  - new: https://git.openjdk.org/jdk/pull/28323/files/f6947173..0824593d

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=28323&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=28323&range=00-01

  Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/28323.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/28323/head:pull/28323

PR: https://git.openjdk.org/jdk/pull/28323


More information about the hotspot-compiler-dev mailing list