RFR: 8334475: UnsafeIntrinsicsTest.java#ZGenerationalDebug assert(!assert_on_failure) failed: Has low-order bits set
Stefan Karlsson
stefank at openjdk.org
Wed Jul 31 08:25:33 UTC 2024
On Tue, 30 Jul 2024 15:37:38 GMT, Saint Wesonga <duke at openjdk.org> wrote:
> The implementation of the pd_conjoint_jlongs_atomic function in the Windows AArch64 port calls pd_conjoint_oops_atomic to copy jlongs from the source to the destination. However, when CHECK_UNHANDLED_OOPS is defined, copying of each jlong in pd_conjoint_oops_atomic calls oop::operator= instead of just copying the jlong.
>
> oop::operator= then treats the value to be copied as a pointer, causing the assertion failure in JDK-8334475. The fix is to directly copy the jlongs from the source to the destination. The test "compiler/gcbarriers/UnsafeIntrinsicsTest.java" now passes on the Windows AArch64 port.
>
> This PR also cleans up code duplication (similar to how https://github.com/openjdk/jdk/pull/12197 cleaned it up when fixing jlong copying for Windows x64).
This looks good to me and similar to the change to x86. I noticed that your change didn't add the inclusion of atomic.hpp file.
It would be good if you could also add. To follow the preferred include structure I'd make sure that you changed the code to:
#include "runtime/atomic.hpp"
#include <string.h>
-------------
Changes requested by stefank (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/20390#pullrequestreview-2209498155
More information about the hotspot-runtime-dev
mailing list