[lworld] RFR: 8313667: [lworld] XBarrierSetC2::clone_at_expansion() uses wrong array copy stub for cloning flat primitive type arrays [v2]
Christian Hagedorn
chagedorn at openjdk.org
Wed Sep 6 06:40:00 UTC 2023
On Tue, 5 Sep 2023 14:40:41 GMT, Christian Hagedorn <chagedorn at openjdk.org> wrote:
>> The singlegen ZGC version of `XBarrierSetC2::clone_at_expansion()` uses the wrong array copy stub for flat primitive type arrays when expanding an `ArrayCopyNode` for cloning. It wrongly treats a flat array of primitive types as flat array of oop pointers. This leads to intermittent wrong executions and crashes in ZGC because we are interpreting primitive values as oops.
>>
>> The fix is straight forward to special case flat arrays in `XBarrierSetC2::clone_at_expansion()` similar to what we already do in `ZBarrierSetC2::clone_at_expansion()`:
>> https://github.com/openjdk/valhalla/blob/3b4cc5fdb038a7363e5ac8a704adacd70701c1ff/src/hotspot/share/gc/z/c2/zBarrierSetC2.cpp#L457-L465
>>
>> Thanks,
>> Christian
>
> Christian Hagedorn has updated the pull request incrementally with one additional commit since the last revision:
>
> Remove braces
Thanks Tobias for your review!
-------------
PR Comment: https://git.openjdk.org/valhalla/pull/924#issuecomment-1707755783
More information about the valhalla-dev
mailing list