From 9003e2c519e63fa547e2f072e47f74057094efa2 Mon Sep 17 00:00:00 2001 From: Stefan Karlsson Date: Fri, 27 Sep 2024 08:28:59 +0000 Subject: [PATCH] 8341027: Crash in java/runtime/Unsafe/InternalErrorTest when running with -XX:-UseCompressedClassPointers Reviewed-by: aboldtch, coleenp --- test/hotspot/jtreg/runtime/Unsafe/InternalErrorTest.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/hotspot/jtreg/runtime/Unsafe/InternalErrorTest.java b/test/hotspot/jtreg/runtime/Unsafe/InternalErrorTest.java index fcf48a7a2d775..01b051af8e550 100644 --- a/test/hotspot/jtreg/runtime/Unsafe/InternalErrorTest.java +++ b/test/hotspot/jtreg/runtime/Unsafe/InternalErrorTest.java @@ -147,7 +147,8 @@ public static void test(MappedByteBuffer buffer, Unsafe unsafe, long mapAddr, lo break; case 1: // testing Unsafe.copySwapMemory, trying to access next page after truncation. - unsafe.copySwapMemory(null, mapAddr + pageSize, new byte[4000], 16, 2000, 2); + int destOffset = Unsafe.ARRAY_BYTE_BASE_OFFSET; + unsafe.copySwapMemory(null, mapAddr + pageSize, new byte[4000], destOffset, 2000, 2); break; case 2: // testing Unsafe.copySwapMemory, trying to access next page after truncation.