Skip to content

Commit 83d0bd8

Browse files
committed
8355069: Allocation::check_out_of_memory() should support CheckUnhandledOops mode
Reviewed-by: sspitsyn
1 parent 1652948 commit 83d0bd8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/hotspot/share/gc/shared/memAllocator.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,10 @@ bool MemAllocator::Allocation::check_out_of_memory() {
126126
// -XX:+HeapDumpOnOutOfMemoryError and -XX:OnOutOfMemoryError support
127127
report_java_out_of_memory(message);
128128
if (JvmtiExport::should_post_resource_exhausted()) {
129+
#ifdef CHECK_UNHANDLED_OOPS
130+
// obj is null, no need to handle, but CheckUnhandledOops is not aware about null
131+
THREAD->allow_unhandled_oop(_obj_ptr);
132+
#endif // CHECK_UNHANDLED_OOPS
129133
JvmtiExport::post_resource_exhausted(
130134
JVMTI_RESOURCE_EXHAUSTED_OOM_ERROR | JVMTI_RESOURCE_EXHAUSTED_JAVA_HEAP,
131135
message);

0 commit comments

Comments
 (0)