changeset in /hg/icedtea: 2007-11-30 Gary Benson <gbenson at redh...

Gary Benson gbenson at redhat.com
Fri Nov 30 07:28:47 PST 2007


changeset f35ffd73f3c4 in /hg/icedtea
details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=f35ffd73f3c4
description:
	2007-11-30  Gary Benson  <gbenson at redhat.com>

		Fixes Bug #83
		* ports/hotspot/src/os_cpu/linux_ppc/vm/os_linux_ppc.cpp
		(JVM_handle_linux_signal): Handle segfaults when the memory
		serialization page is write protected.

diffstat:

2 files changed, 33 insertions(+)
ChangeLog                                              |    7 ++++
ports/hotspot/src/os_cpu/linux_ppc/vm/os_linux_ppc.cpp |   26 ++++++++++++++++

diffs (50 lines):

diff -r 4493fa89182d -r f35ffd73f3c4 ChangeLog
--- a/ChangeLog	Thu Nov 29 14:27:16 2007 -0500
+++ b/ChangeLog	Fri Nov 30 10:28:41 2007 -0500
@@ -1,3 +1,10 @@ 2007-11-29  Matthias Klose  <doko at ubuntu
+2007-11-30  Gary Benson  <gbenson at redhat.com>
+
+	Fixes Bug #83
+	* ports/hotspot/src/os_cpu/linux_ppc/vm/os_linux_ppc.cpp
+	(JVM_handle_linux_signal): Handle segfaults when the memory
+	serialization page is write protected.
+
 2007-11-29  Matthias Klose  <doko at ubuntu.com>
 
 	* Makefile.am: Create symlinks to find jni header files.
diff -r 4493fa89182d -r f35ffd73f3c4 ports/hotspot/src/os_cpu/linux_ppc/vm/os_linux_ppc.cpp
--- a/ports/hotspot/src/os_cpu/linux_ppc/vm/os_linux_ppc.cpp	Thu Nov 29 14:27:16 2007 -0500
+++ b/ports/hotspot/src/os_cpu/linux_ppc/vm/os_linux_ppc.cpp	Fri Nov 30 10:28:41 2007 -0500
@@ -108,6 +108,32 @@ JVM_handle_linux_signal(int sig,
     }
   }
 
+  JavaThread* thread = NULL;
+  VMThread* vmthread = NULL;
+  if (os::Linux::signal_handlers_are_installed) {
+    if (t != NULL ){
+      if(t->is_Java_thread()) {
+        thread = (JavaThread*)t;
+      }
+      else if(t->is_VM_thread()){
+        vmthread = (VMThread *)t;
+      }
+    }
+  }
+
+  if (info != NULL && thread != NULL) {
+    // Check to see if we caught the safepoint code in the process
+    // of write protecting the memory serialization page.  It write
+    // enables the page immediately after protecting it so we can
+    // just return to retry the write.
+    if (sig == SIGSEGV &&
+        os::is_memory_serialize_page(thread, (address) info->si_addr)) {
+      // Block current thread until permission is restored.
+      os::block_on_serialize_page_trap();
+      return true;
+    }
+  }
+
   const char *fmt = "caught unhandled signal %d";
   char buf[64];
 



More information about the distro-pkg-dev mailing list