[16] RFR (S) 8249749: modify a primitive array through a stream and a for cycle causes jre crash

Tobias Hartmann tobias.hartmann at oracle.com
Mon Aug 10 07:32:51 UTC 2020


Hi Vladimir,

looks good to me.

Little typo in the test on line 27: "explressions".

Best regards,
Tobias

On 10.08.20 06:25, Vladimir Kozlov wrote:
> http://cr.openjdk.java.net/~kvn/8249749/webrev.00/
> https://bugs.openjdk.java.net/browse/JDK-8249749
> 
> SuperWord does not recognize array indexing pattern used in the test due to additional AddI node:
> 
> AddI(AddI(Invariant(j*n), Loop_phi(i)), Loop_inc(1))
> 
> As result it can't find memory reference to align vectors. But code ignores that and continue
> execution.
> Later when align_to_ref is referenced we hit SEGV because it is NULL.
> 
> The fix is to check align_to_ref for NULL early and bailout.
> 
> I also adjusted code in SWPointer::scaled_iv_plus_offset() to recognize this address pattern to
> vectorize test's code.
> And added missing _invar setting.
> 
> And I slightly modified tracking code to investigate this issue.
> 
> Added new test to check some complex address expressions similar to bug's test case. Not all cases
> in test are vectorized - there are other conditions which prevent that.
> 
> Tested tier1,tier2,hs-tier3,precheckin-comp
> 
> Thanks,
> Vladimir K


More information about the hotspot-compiler-dev mailing list