# HG changeset patch
# User hseigel
# Date 1389655857 18000
# Node ID 768421ed821144d4b23233762dbf97523b71ffda
# Parent d85f79f0c4766fbf5fd1e62eaaea75113d1a45bb# Parent db1ff6781ab4d7aee1665ed4664f786abf0f12f6
Merge
diff -r db1ff6781ab4 -r 768421ed8211 src/os/windows/vm/os_windows.cpp
--- a/src/os/windows/vm/os_windows.cpp Fri Jan 10 12:54:08 2014 -0800
+++ b/src/os/windows/vm/os_windows.cpp Mon Jan 13 18:30:57 2014 -0500
@@ -166,12 +166,10 @@
return;
}
-#ifndef _WIN64
// previous UnhandledExceptionFilter, if there is one
static LPTOP_LEVEL_EXCEPTION_FILTER prev_uef_handler = NULL;
LONG WINAPI Handle_FLT_Exception(struct _EXCEPTION_POINTERS* exceptionInfo);
-#endif
void os::init_system_properties_values() {
/* sysclasspath, java_home, dll_dir */
{
@@ -2240,11 +2238,11 @@
return EXCEPTION_CONTINUE_EXECUTION;
}
-#ifndef _WIN64
//-----------------------------------------------------------------------------
LONG WINAPI Handle_FLT_Exception(struct _EXCEPTION_POINTERS* exceptionInfo) {
+ PCONTEXT ctx = exceptionInfo->ContextRecord;
+#ifndef _WIN64
// handle exception caused by native method modifying control word
- PCONTEXT ctx = exceptionInfo->ContextRecord;
DWORD exception_code = exceptionInfo->ExceptionRecord->ExceptionCode;
switch (exception_code) {
@@ -2270,17 +2268,11 @@
// UnhandledExceptionFilter.
return (prev_uef_handler)(exceptionInfo);
}
-
- return EXCEPTION_CONTINUE_SEARCH;
-}
-#else //_WIN64
+#else // !_WIN64
/*
On Windows, the mxcsr control bits are non-volatile across calls
See also CR 6192333
- If EXCEPTION_FLT_* happened after some native method modified
- mxcsr - it is not a jvm fault.
- However should we decide to restore of mxcsr after a faulty
- native method we can uncomment following code
+ */
jint MxCsr = INITIAL_MXCSR;
// we can't use StubRoutines::addr_mxcsr_std()
// because in Win64 mxcsr is not saved there
@@ -2288,10 +2280,10 @@
ctx->MxCsr = MxCsr;
return EXCEPTION_CONTINUE_EXECUTION;
}
-
-*/
-#endif //_WIN64
-
+#endif // !_WIN64
+
+ return EXCEPTION_CONTINUE_SEARCH;
+}
// Fatal error reporting is single threaded so we can make this a
// static and preallocated. If it's more than MAX_PATH silently ignore
@@ -2640,7 +2632,6 @@
} // switch
}
-#ifndef _WIN64
if (((thread->thread_state() == _thread_in_Java) ||
(thread->thread_state() == _thread_in_native)) &&
exception_code != EXCEPTION_UNCAUGHT_CXX_EXCEPTION)
@@ -2648,7 +2639,6 @@
LONG result=Handle_FLT_Exception(exceptionInfo);
if (result==EXCEPTION_CONTINUE_EXECUTION) return result;
}
-#endif //_WIN64
}
if (exception_code != EXCEPTION_BREAKPOINT) {
diff -r db1ff6781ab4 -r 768421ed8211 src/share/vm/classfile/classFileParser.cpp
--- a/src/share/vm/classfile/classFileParser.cpp Fri Jan 10 12:54:08 2014 -0800
+++ b/src/share/vm/classfile/classFileParser.cpp Mon Jan 13 18:30:57 2014 -0500
@@ -4098,8 +4098,12 @@
tty->print("[Loaded %s from %s]\n", this_klass->external_name(),
cfs->source());
} else if (class_loader.is_null()) {
- if (THREAD->is_Java_thread()) {
- Klass* caller = ((JavaThread*)THREAD)->security_get_caller_class(1);
+ Klass* caller =
+ THREAD->is_Java_thread()
+ ? ((JavaThread*)THREAD)->security_get_caller_class(1)
+ : NULL;
+ // caller can be NULL, for example, during a JVMTI VM_Init hook
+ if (caller != NULL) {
tty->print("[Loaded %s by instance of %s]\n",
this_klass->external_name(),
InstanceKlass::cast(caller)->external_name());
diff -r db1ff6781ab4 -r 768421ed8211 src/share/vm/trace/tracetypes.xml
--- a/src/share/vm/trace/tracetypes.xml Fri Jan 10 12:54:08 2014 -0800
+++ b/src/share/vm/trace/tracetypes.xml Mon Jan 13 18:30:57 2014 -0500
@@ -85,12 +85,6 @@
-
-
-
-
-
@@ -116,17 +110,6 @@
-
-
-
-
-
-
-
-
-
-
diff -r db1ff6781ab4 -r 768421ed8211 test/runtime/jsig/Test8017498.sh
--- a/test/runtime/jsig/Test8017498.sh Fri Jan 10 12:54:08 2014 -0800
+++ b/test/runtime/jsig/Test8017498.sh Mon Jan 13 18:30:57 2014 -0500
@@ -1,7 +1,7 @@
#!/bin/sh
#
-# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -29,6 +29,7 @@
## @bug 8017498
## @bug 8020791
## @bug 8021296
+## @bug 8022301
## @summary sigaction(sig) results in process hang/timed-out if sig is much greater than SIGRTMAX
## @run shell/timeout=30 Test8017498.sh
##
@@ -42,6 +43,8 @@
## Adding common setup Variables for running shell tests.
. ${TESTSRC}/../../test_env.sh
+EXTRA_CFLAG=
+
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
@@ -57,6 +60,7 @@
MY_LD_PRELOAD=${TESTJAVA}${FS}jre${FS}lib${FS}amd64${FS}libjsig.so
else
MY_LD_PRELOAD=${TESTJAVA}${FS}jre${FS}lib${FS}i386${FS}libjsig.so
+ EXTRA_CFLAG=-m32
fi
echo MY_LD_PRELOAD = ${MY_LD_PRELOAD}
;;
@@ -72,6 +76,7 @@
${TESTJAVA}${FS}bin${FS}javac *.java
$gcc_cmd -DLINUX -fPIC -shared \
+ ${EXTRA_CFLAG} -z noexecstack \
-o ${TESTSRC}${FS}libTestJNI.so \
-I${TESTJAVA}${FS}include \
-I${TESTJAVA}${FS}include${FS}linux \