< prev index next >

src/hotspot/share/utilities/exceptions.cpp

Print this page
*** 158,12 ***
    // Check for special boot-strapping/compiler-thread handling
    if (special_exception(thread, file, line, h_exception)) {
      return;
    }
  
!   if (h_exception->is_a(vmClasses::OutOfMemoryError_klass())) {
!     count_out_of_memory_exceptions(h_exception);
    }
  
    if (h_exception->is_a(vmClasses::LinkageError_klass())) {
      Atomic::inc(&_linkage_errors, memory_order_relaxed);
    }
--- 158,18 ---
    // Check for special boot-strapping/compiler-thread handling
    if (special_exception(thread, file, line, h_exception)) {
      return;
    }
  
!   if (h_exception->is_a(vmClasses::VirtualMachineError_klass())) {
!     // Remove the ScopedValue bindings in case we got a virtual machine
+     // Error while we were trying to manipulate ScopedValue bindings.
+     thread->clear_scopedValueBindings();
+ 
+     if (h_exception->is_a(vmClasses::OutOfMemoryError_klass())) {
+       count_out_of_memory_exceptions(h_exception);
+     }
    }
  
    if (h_exception->is_a(vmClasses::LinkageError_klass())) {
      Atomic::inc(&_linkage_errors, memory_order_relaxed);
    }
< prev index next >