[10] RFR(XS): 8194494: SHA-512 stub uses AVX 2 instructions on non-supporting CPUs

Tobias Hartmann tobias.hartmann at oracle.com
Wed Jan 3 16:49:47 UTC 2018


Hi,

please review the following patch:
https://bugs.openjdk.java.net/browse/JDK-8194494
http://cr.openjdk.java.net/~thartmann/8194494/webrev.00/

The VM crashes with SIGILL on CPUs that have the SHA extension but no AVX 2 support because since JDK-8165381 the
SHA-512 stub uses AVX 2 instructions (for example, 'vpblendd'). In addition to UseSHA, we need to check for
supports_avx2() && supports_bmi2() on x86.

I had no suitable machine available for testing but I was able to trigger the problem by enforcing
UseSHA512Intrinsics=true on my machine and disabling AVX 2 support (see comments in the bug for details).

This problem was reported by Csaba Mate [1].

Thanks,
Tobias

[1] http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/2018-January/028002.html


More information about the hotspot-compiler-dev mailing list