7016112: CMS: crash during promotion testing

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
This commit is contained in:
Bengt Rutisson 2011-06-28 14:23:27 +02:00
parent 4597e4c7a8
commit 3aaa5fb06d
5 changed files with 394 additions and 58 deletions

View file

@ -3296,6 +3296,19 @@ _JNI_IMPORT_OR_EXPORT_ jint JNICALL JNI_GetDefaultJavaVMInitArgs(void *args_) {
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 @@ _JNI_IMPORT_OR_EXPORT_ jint JNICALL JNI_CreateJavaVM(JavaVM **vm, void **penv, v
}
NOT_PRODUCT(test_error_handler(ErrorHandlerTest));
NOT_PRODUCT(execute_internal_vm_tests());
return result;
}