8199780: SetMemory0 and CopyMemory0 in unsafe.cpp need to resolve their operands
Reviewed-by: shade, zgu, eosterlund
--- a/src/hotspot/share/prims/unsafe.cpp Tue Apr 03 12:55:26 2018 +0200
+++ b/src/hotspot/share/prims/unsafe.cpp Tue Apr 03 17:36:19 2018 +0200
@@ -123,6 +123,10 @@
assert_field_offset_sane(p, field_offset);
jlong byte_offset = field_offset_to_byte_offset(field_offset);
+ if (p != NULL) {
+ p = Access<>::resolve(p);
+ }
+
if (sizeof(char*) == sizeof(jint)) { // (this constant folds!)
return (address)p + (jint) byte_offset;
} else {