From 06ed7f996838e22114fc7cf3abbb6c71baaccd60 Mon Sep 17 00:00:00 2001 From: Liang Mao Date: Wed, 1 Nov 2023 16:00:31 +0800 Subject: [PATCH] gtest --- test/hotspot/gtest/oops/test_typeArrayOop.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/hotspot/gtest/oops/test_typeArrayOop.cpp b/test/hotspot/gtest/oops/test_typeArrayOop.cpp index 0b57be309b7..6f56767e78a 100644 --- a/test/hotspot/gtest/oops/test_typeArrayOop.cpp +++ b/test/hotspot/gtest/oops/test_typeArrayOop.cpp @@ -36,7 +36,11 @@ TEST_VM(typeArrayOopDesc, bool_at_put) { char* addr = align_up(mem, 16); typeArrayOop o = (typeArrayOop) addr; - o->set_klass(Universe::boolArrayKlassObj()); + if (UseCompactObjectHeaders) { + o->set_mark(Universe::boolArrayKlassObj()->prototype_header()); + } else { + o->set_klass(Universe::boolArrayKlassObj()); + } o->set_length(10);