Skip to content

Commit

Permalink
Remove invalid cast from jlong* to oop*
Browse files Browse the repository at this point in the history
  • Loading branch information
swesonga committed Jul 26, 2024
1 parent ee839b7 commit b86cc3b
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/hotspot/os_cpu/windows_aarch64/copy_windows_aarch64.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,19 @@ static void pd_conjoint_jints_atomic(const jint* from, jint* to, size_t count) {
}

static void pd_conjoint_jlongs_atomic(const jlong* from, jlong* to, size_t count) {
pd_conjoint_oops_atomic((const oop*)from, (oop*)to, count);
if (from > to) {
while (count-- > 0) {
// Copy forwards
*to++ = *from++;
}
} else {
from += count - 1;
to += count - 1;
while (count-- > 0) {
// Copy backwards
*to-- = *from--;
}
}
}

static void pd_conjoint_oops_atomic(const oop* from, oop* to, size_t count) {
Expand Down

0 comments on commit b86cc3b

Please sign in to comment.