RFR: 8271925: ZGC: Arraycopy stub passes invalid oop to load barrier
Vladimir Kozlov
kvn at openjdk.java.net
Fri Aug 6 00:10:30 UTC 2021
On Thu, 5 Aug 2021 21:27:56 GMT, Nils Eliasson <neliasso at openjdk.org> wrote:
>> src/hotspot/share/gc/z/c2/zBarrierSetC2.cpp line 309:
>>
>>> 307: assert(!UseCompressedClassPointers, "should only happen without compressed class pointers");
>>> 308: assert((arrayOopDesc::base_offset_in_bytes(T_OBJECT) - offset) == BytesPerLong, "unexpected offset");
>>> 309: length = phase->transform_later(new SubXNode(length, phase->longcon(1))); // Size is in longs
>>
>> Do we have check that `length` is count of `BytesPerLong`?
>> Do we have a guard that this code is executed only in 64-bit VM?
>> `SubXNode` is SubINode in 32-bit VM.
>
> Z is 64 bit only.
Okay. `SubLNode` should be used then to avoid confusion.
By expending code I see that it is guarded by `(bt == T_OBJECT)` so `length` is indeed in `longs`. No issue here.
-------------
PR: https://git.openjdk.java.net/jdk/pull/5014
More information about the hotspot-compiler-dev
mailing list