# HG changeset patch # User dlong # Date 1598653143 25200 # Fri Aug 28 15:19:03 2020 -0700 # Node ID efc5d5719463171ec21d6ffecea885af45a45212 # Parent 4fb10e3cf9bd53520b0298904843e633f5d22901 8209961: [AOT] crash in Graal stub when -XX:+VerifyOops is used diff -r 4fb10e3cf9bd -r efc5d5719463 make/RunTests.gmk --- a/make/RunTests.gmk Fri Aug 28 15:08:34 2020 -0700 +++ b/make/RunTests.gmk Fri Aug 28 15:19:03 2020 -0700 @@ -172,6 +172,10 @@ $1_JAOTC_OPTS += --compile-with-assertions endif + ifneq ($$(filter -XX:+VerifyOops, $$($1_VM_OPTIONS)), ) + $1_JAOTC_OPTS += -J-Dgraal.AOTVerifyOops=true + endif + $$($1_AOT_LIB): $$(JDK_UNDER_TEST)/release \ $$(call DependOnVariable, $1_JAOTC_OPTS) \ $$(call DependOnVariable, JDK_UNDER_TEST) diff -r 4fb10e3cf9bd -r efc5d5719463 src/hotspot/share/aot/aotCodeHeap.cpp --- a/src/hotspot/share/aot/aotCodeHeap.cpp Fri Aug 28 15:08:34 2020 -0700 +++ b/src/hotspot/share/aot/aotCodeHeap.cpp Fri Aug 28 15:19:03 2020 -0700 @@ -566,6 +566,10 @@ SET_AOT_GLOBAL_SYMBOL_VALUE("_aot_stub_routines_throw_delayed_StackOverflowError_entry", address, StubRoutines::_throw_delayed_StackOverflowError_entry); + SET_AOT_GLOBAL_SYMBOL_VALUE("_aot_verify_oops", intptr_t, VerifyOops); + SET_AOT_GLOBAL_SYMBOL_VALUE("_aot_verify_oop_count_address", jint *, &StubRoutines::_verify_oop_count); + SET_AOT_GLOBAL_SYMBOL_VALUE("_aot_verify_oop_bits", intptr_t, Universe::verify_oop_bits()); + SET_AOT_GLOBAL_SYMBOL_VALUE("_aot_verify_oop_mask", intptr_t, Universe::verify_oop_mask()); } void AOTCodeHeap::link_os_symbols() { diff -r 4fb10e3cf9bd -r efc5d5719463 src/hotspot/share/jvmci/jvmciCodeInstaller.cpp --- a/src/hotspot/share/jvmci/jvmciCodeInstaller.cpp Fri Aug 28 15:08:34 2020 -0700 +++ b/src/hotspot/share/jvmci/jvmciCodeInstaller.cpp Fri Aug 28 15:19:03 2020 -0700 @@ -1386,6 +1386,10 @@ case CRC_TABLE_ADDRESS: case LOG_OF_HEAP_REGION_GRAIN_BYTES: case INLINE_CONTIGUOUS_ALLOCATION_SUPPORTED: + case VERIFY_OOPS: + case VERIFY_OOP_BITS: + case VERIFY_OOP_MASK: + case VERIFY_OOP_COUNT_ADDRESS: break; default: JVMCI_ERROR("invalid mark id: %d", id); diff -r 4fb10e3cf9bd -r efc5d5719463 src/hotspot/share/jvmci/jvmciCodeInstaller.hpp --- a/src/hotspot/share/jvmci/jvmciCodeInstaller.hpp Fri Aug 28 15:08:34 2020 -0700 +++ b/src/hotspot/share/jvmci/jvmciCodeInstaller.hpp Fri Aug 28 15:19:03 2020 -0700 @@ -160,6 +160,10 @@ LOG_OF_HEAP_REGION_GRAIN_BYTES, INLINE_CONTIGUOUS_ALLOCATION_SUPPORTED, DEOPT_MH_HANDLER_ENTRY, + VERIFY_OOPS, + VERIFY_OOP_BITS, + VERIFY_OOP_MASK, + VERIFY_OOP_COUNT_ADDRESS, INVOKE_INVALID = -1 }; diff -r 4fb10e3cf9bd -r efc5d5719463 src/hotspot/share/jvmci/vmStructs_jvmci.cpp --- a/src/hotspot/share/jvmci/vmStructs_jvmci.cpp Fri Aug 28 15:08:34 2020 -0700 +++ b/src/hotspot/share/jvmci/vmStructs_jvmci.cpp Fri Aug 28 15:19:03 2020 -0700 @@ -472,6 +472,10 @@ declare_constant(CodeInstaller::LOG_OF_HEAP_REGION_GRAIN_BYTES) \ declare_constant(CodeInstaller::INLINE_CONTIGUOUS_ALLOCATION_SUPPORTED) \ declare_constant(CodeInstaller::DEOPT_MH_HANDLER_ENTRY) \ + declare_constant(CodeInstaller::VERIFY_OOP_COUNT_ADDRESS) \ + declare_constant(CodeInstaller::VERIFY_OOPS) \ + declare_constant(CodeInstaller::VERIFY_OOP_BITS) \ + declare_constant(CodeInstaller::VERIFY_OOP_MASK) \ declare_constant(CodeInstaller::INVOKE_INVALID) \ \ declare_constant(vmIntrinsics::FIRST_MH_SIG_POLY) \ diff -r 4fb10e3cf9bd -r efc5d5719463 test/jtreg-ext/requires/VMProps.java --- a/test/jtreg-ext/requires/VMProps.java Fri Aug 28 15:08:34 2020 -0700 +++ b/test/jtreg-ext/requires/VMProps.java Fri Aug 28 15:19:03 2020 -0700 @@ -389,11 +389,6 @@ return "false"; } - if (WB.getBooleanVMFlag("VerifyOops")) { - // Should be enabled when JDK-8209961 is fixed - return "false"; - } - switch (GC.selected()) { case Serial: case Parallel: