Vzeroupper hotspot bug

Viswanathan, Sandhya sandhya.viswanathan at intel.com
Fri Apr 17 20:41:11 UTC 2015


Hi Vladimir,

With 32 byte width vectorization the JVM produces wrong results under certain circumstances for x86_64.
The Vzeroupper instruction introduced in String.equals, String.compareTo and OptimizeFill intrinsic/stubs in the following change set is the cause of the bug:

http://hg.openjdk.java.net/jdk7u/jdk7u/hotspot/rev/d59ed8d47aed

For 32 byte vectorization, YMM registers are used by the hotspot compiler and the register allocator can allocate these across intrinsic methods.
Vzeroupper in the intrinsic is clobbering upper 16 bytes in all the other YMM registers that are not touched in these methods and so our customers are seeing unexpected results.



We need your help to create an RFE for this problem.



I have created a patch that fixes the problem on Linux and I will send you the corresponding webrev to attach to the RFE.



Best Regards,

Sandhya




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20150417/8ddbf6ee/attachment.html>


More information about the hotspot-compiler-dev mailing list