mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8199780: SetMemory0 and CopyMemory0 in unsafe.cpp need to resolve their operands
Reviewed-by: shade, zgu, eosterlund
This commit is contained in:
parent
4d780ef52d
commit
ddc83cb0e4
1 changed files with 4 additions and 0 deletions
|
@ -123,6 +123,10 @@ static inline void* index_oop_from_field_offset_long(oop p, jlong field_offset)
|
||||||
assert_field_offset_sane(p, field_offset);
|
assert_field_offset_sane(p, field_offset);
|
||||||
jlong byte_offset = field_offset_to_byte_offset(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!)
|
if (sizeof(char*) == sizeof(jint)) { // (this constant folds!)
|
||||||
return (address)p + (jint) byte_offset;
|
return (address)p + (jint) byte_offset;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue