Review Request: JDK-6653795: C2 intrinsic for Unsafe.getAddress performs pointer sign extension on 32-bit systems

Poonam Bajaj poonam.bajaj at oracle.com
Fri Mar 21 03:20:33 UTC 2014


Thanks Vladimir. Moved the test to test/compiler/intrinsics/unsafe/ and 
updated the webrev:
http://cr.openjdk.java.net/~poonam/6653795/webrev.01/

Thanks,
Poonam

On 3/21/2014 8:06 AM, Vladimir Kozlov wrote:
> Hi Poonam
>
> Changes are good but you need to place the test into other directory:
>
> test/compiler/intrinsics/unsafe/UnsafeGetAddressTest.java
>
> We don't use bug id for directory name anymore in jdk9 and 8u.
>
> Thanks,
> Vladimir
>
> On 3/20/14 7:26 PM, Poonam Bajaj wrote:
>> This is the code review request for the fix of 6653795 for jdk9 and 8:
>> JDK-6653795 <https://bugs.openjdk.java.net/browse/JDK-6653795>: C2
>> intrinsic for Unsafe.getAddress performs pointer sign extension on
>> 32-bit systems
>>
>> Problem and fix: The API documentation of sun.misc.Unsafe.getAddress()
>> states that it fetches a native pointer from a given memory address and
>> if the native pointer is less than 64 bits wide, it is extended as an
>> unsigned number to a Java long. But the intrinsic version of this method
>> extends the native pointer as a signed number. It should be extended as
>> an unsigned number.
>>
>> Webrev: http://cr.openjdk.java.net/~poonam/6653795/webrev.00/
>>
>> The same fix had to be first integrated into jdk7u and these changes are
>> cleanly imported to jdk9 and 8.
>>
>> Thanks,
>> Poonam
>>


More information about the hotspot-compiler-dev mailing list