[16] RFR (S) 8249749: modify a primitive array through a stream and a for cycle causes jre crash
Vladimir Ivanov
vladimir.x.ivanov at oracle.com
Mon Aug 10 09:04:17 UTC 2020
> http://cr.openjdk.java.net/~kvn/8249749/webrev.00/
Looks good.
Best regards,
Vladimir Ivanov
> 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