Running test/hotspot/jtreg/compiler/uncommontrap/TestDeoptOOM.java with -XX:+VerifyStack crashes with:
java.lang.OutOfMemoryError
{0x00000000f80c79b8} - klass: 'java/lang/OutOfMemoryError'
- ---- fields (total size 5 words):
- private transient 'backtrace' 'Ljava/lang/Object;' @12 NULL (0)
- private 'detailMessage' 'Ljava/lang/String;' @16 "Java heap space: failed reallocation of scalar replaced objects"{0x00000000f80d2df8} (f80d2df8)
- private 'cause' 'Ljava/lang/Throwable;' @20 NULL (0)
- private 'stackTrace' '[Ljava/lang/StackTraceElement;' @24 NULL (0)
- private strict 'suppressedExceptions' 'Ljava/util/List;' @28 NULL (0)
- private transient 'depth' 'I' @32 0
# Internal Error (/oracle/jdk_hs/open/src/hotspot/share/utilities/exceptions.cpp:484), pid=9967, tid=10020
# fatal error: ExceptionMark constructor expects no pending exceptions
Stack: [0x00007fa8a006b000,0x00007fa8a016c000], sp=0x00007fa8a0168040, free space=1012k
Native frames: (J=compiled Java code, A=aot compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [libjvm.so+0x1525574] VMError::report_and_die(int, char const*, char const*, __va_list_tag*, Thread*, unsigned char*, void*, void*, char const*, int, unsigned long)+0x5b8
V [libjvm.so+0x1524f1b] VMError::report_and_die(Thread*, char const*, int, char const*, char const*, __va_list_tag*)+0x65
V [libjvm.so+0xa60d98] report_fatal(char const*, int, char const*, ...)+0x108
V [libjvm.so+0xb8c5a8] ExceptionMark::ExceptionMark(Thread*&)+0x9a
V [libjvm.so+0x1259ff6] OopMapCacheEntry::fill(methodHandle const&, int)+0xe4
V [libjvm.so+0x125b296] OopMapCache::compute_one_oop_map(methodHandle const&, int, InterpreterOopMap*)+0xba
V [libjvm.so+0xa8032a] Deoptimization::unpack_frames(JavaThread*, int)+0x446
v blob 0x00007fa8d104f6ac
j compiler.uncommontrap.TestDeoptOOM.m1(Z)Lcompiler/uncommontrap/TestDeoptOOM;+9
j compiler.uncommontrap.TestDeoptOOM.main([Ljava/lang/String;)V+24
v ~StubRoutines::call_stub
V [libjvm.so+0xda3c6b] JavaCalls::call_helper(JavaValue*, methodHandle const&, JavaCallArguments*, Thread*)+0x60b
V [libjvm.so+0x127cfb1] os::os_exception_wrapper(void (*)(JavaValue*, methodHandle const&, JavaCallArguments*, Thread*), JavaValue*, methodHandle const&, JavaCallArguments*, Thread*)+0x41
V [libjvm.so+0xda364a] JavaCalls::call(JavaValue*, methodHandle const&, JavaCallArguments*, Thread*)+0xaa
V [libjvm.so+0x1353a9f] invoke(InstanceKlass*, methodHandle const&, Handle, bool, objArrayHandle, BasicType, objArrayHandle, bool, Thread*)+0xc29
V [libjvm.so+0x1353df8] Reflection::invoke_method(oopDesc*, Handle, objArrayHandle, Thread*)+0x1a0
V [libjvm.so+0xee8b5e] JVM_InvokeMethod+0x2a6
C [libjava.so+0x10392] Java_jdk_internal_reflect_NativeMethodAccessorImpl_invoke0+0x43
j jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Ljava/lang/reflect/Method;Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+0 java.base
j jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+100 java.base
j jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+6 java.base
j java.lang.reflect.Method.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+59 java.base
j com.sun.javatest.regtest.agent.MainWrapper$MainThread.run()V+172
j java.lang.Thread.run()V+11 java.base
v ~StubRoutines::call_stub
V [libjvm.so+0xda3c6b] JavaCalls::call_helper(JavaValue*, methodHandle const&, JavaCallArguments*, Thread*)+0x60b
V [libjvm.so+0x127cfb1] os::os_exception_wrapper(void (*)(JavaValue*, methodHandle const&, JavaCallArguments*, Thread*), JavaValue*, methodHandle const&, JavaCallArguments*, Thread*)+0x41
V [libjvm.so+0xda364a] JavaCalls::call(JavaValue*, methodHandle const&, JavaCallArguments*, Thread*)+0xaa
V [libjvm.so+0xda28a8] JavaCalls::call_virtual(JavaValue*, Klass*, Symbol*, Symbol*, JavaCallArguments*, Thread*)+0x1a4
V [libjvm.so+0xda29cf] JavaCalls::call_virtual(JavaValue*, Handle, Klass*, Symbol*, Symbol*, Thread*)+0x95
V [libjvm.so+0xee25df] thread_entry(JavaThread*, Thread*)+0xa0
V [libjvm.so+0x148e970] JavaThread::thread_main_inner()+0x174
V [libjvm.so+0x148e7da] JavaThread::run()+0x1a4
V [libjvm.so+0x1270edc] thread_native_entry(Thread*)+0x19e