On Tue, 15 Nov 2022 00:10:35 GMT, Vladimir Ivanov <vliva...@openjdk.org> wrote:

>> Volodymyr Paprotski has updated the pull request with a new target base due 
>> to a merge or a rebase. The pull request now contains 23 commits:
>> 
>>  - Merge remote-tracking branch 'origin/master' into avx512-poly
>>  - Vladimir's review
>>  - live review with Sandhya
>>  - jcheck
>>  - Sandhya's review
>>  - fix windows and 32b linux builds
>>  - add getLimbs to interface and reviews
>>  - fix 32-bit build
>>  - make UsePolyIntrinsics option diagnostic
>>  - Merge remote-tracking branch 'origin/master' into avx512-poly
>>  - ... and 13 more: https://git.openjdk.org/jdk/compare/e269dc03...a26ac7db
>
> src/hotspot/cpu/x86/stubGenerator_x86_64_poly.cpp line 387:
> 
>> 385:   const Register t2 = r14;
>> 386: 
>> 387:   __ movq(a0, Address(limbs, 0));
> 
> I don't understand how it works. `limbs` comes directly from `c_rarg2` and 
> contains raw oop. So, `Address(limbs, 0)` reads object mark word rather than 
> the first element from the array. 
> 
> (Same situation in `poly1305_limbs_out`. And now I'm curious why doesn't 
> object header corruption trigger a crash.)

library_call.cpp takes care of that, it passes the address of 0'th element to 
the stub.

-------------

PR: https://git.openjdk.org/jdk/pull/10582

Reply via email to