RFR : JDK-8067744 : XMM/SSE float register values corrupted by JNI_CreateVM call in JRE 8 (Windows)
Dmitry Chuyko
dmitry.chuyko at oracle.com
Tue Oct 25 10:27:01 UTC 2016
Now generate_get_cpu_info() preserves full xmm7,8,31 in AVX512 case and
lower xmm7,8,15 in non-512 case (touched ones).
Webrev: http://javaweb.us.oracle.com/~dchuyko/webrevs/8067744/webrev.01
Testing:
https://jdash.se.oracle.com/rbt/rbt-dmitry.chuyko-myclone9-20161021-1608-26214,
new test passes with the patch on the machine where the bug is reproducible.
-Dmitry
On 10/20/2016 09:09 PM, Dmitry Chuyko wrote:
> Vladimir, thanks.
>
> https://msdn.microsoft.com/en-us/library/9z1stfyw.aspx says YMM should
> be preserved by caller and ZMM are not mentioned at all. I even
> doubted if xmm31 should be restored in the patch as it is also not
> mentioned but finally added it for consistency of the code with same
> AVX512 width.
>
> The change with completely separate evex/non-evex save-restore will be
> slightly larger, I'll prepare the patch.
>
> -Dmitry
>
> On 10/20/2016 08:25 PM, Vladimir Kozlov wrote:
>> Hi Dmitry,
>>
>> New code does not restore whole 64-bit of xmm7,8,15 in AVX512 case. I
>> think you can totally separate save/restore for these cases.
>>
>> thanks,
>> Vladimir
>>
>> On 10/19/16 4:49 AM, Dmitry Chuyko wrote:
>>> Summary: Few xmm registers saved on stack and restored in
>>> generate_get_cpu_info on Windows, a bit different on 2 detection paths.
>>> New test calls native executable that loads jvm shared library and
>>> checks if some double values are corrupted. The test reproduced the
>>> problem on my machine with current devkit but not on Aurora.
>>>
>>> Bug: https://bugs.openjdk.java.net/browse/JDK-8067744
>>>
>>> Webrev:
>>> http://javaweb.us.oracle.com/~dchuyko/webrevs/8067744/webrev.00/
>>>
>>> Testing: RBT -j hs-tier0-comp, fix applied over 9-b140 mainline,
>>> hotspot
>>> b44d14948c83
>>> before
>>> https://jdash.se.oracle.com/rbt/rbt-dmitry.chuyko-myclone9-20161018-1618-25974
>>>
>>>
>>> after
>>> https://jdash.se.oracle.com/rbt/rbt-dmitry.chuyko-myclone9-20161018-1710-25984
>>>
>>>
>>>
>>> Thanks,
>>> -Dmitry
>>>
>
More information about the hotspot-compiler-dev
mailing list