diff src/share/vm/prims/jni.cpp @ 3779:04760e41b01e

7016112: CMS: crash during promotion testing Summary: Also reviewed by mikael.gerdin@oracle.com; stdlib:qsort() does byte-by-byte swapping on Windows. This leads to pointer shearing. Fix is to implement a quicksort that does full pointer updates. Reviewed-by: never, coleenp, ysr
author brutisso
date Tue, 28 Jun 2011 14:23:27 +0200
parents e1162778c1c8
children 8a4fc2990229
line wrap: on
line diff
--- a/src/share/vm/prims/jni.cpp	Fri Jun 24 12:38:49 2011 -0400
+++ b/src/share/vm/prims/jni.cpp	Tue Jun 28 14:23:27 2011 +0200
@@ -3296,6 +3296,19 @@
   return ret;
 }
 
+#ifndef PRODUCT
+
+#include "utilities/quickSort.hpp"
+
+void execute_internal_vm_tests() {
+  if (ExecuteInternalVMTests) {
+    assert(QuickSort::test_quick_sort(), "test_quick_sort failed");
+    tty->print_cr("All tests passed");
+  }
+}
+
+#endif
+
 HS_DTRACE_PROBE_DECL3(hotspot_jni, CreateJavaVM__entry, vm, penv, args);
 DT_RETURN_MARK_DECL(CreateJavaVM, jint);
 
@@ -3386,6 +3399,7 @@
   }
 
   NOT_PRODUCT(test_error_handler(ErrorHandlerTest));
+  NOT_PRODUCT(execute_internal_vm_tests());
   return result;
 }