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 02:26:46 UTC 2014


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

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


More information about the hotspot-compiler-dev mailing list