diff src/os/solaris/vm/os_solaris.cpp @ 477:24fda36852ce

6727377: VM stack guard pages on Windows should PAGE_READWRITE not PAGE_EXECUTE_READWRITE Summary: Make reguard_stack change access to RW, not execute and use os::protect_memory with the new parameter when change needed to X. Reviewed-by: acorn, jcoomes
author coleenp
date Wed, 10 Dec 2008 15:14:29 -0800
parents 85f1b9537f70
children 8a25d96bcf08
line wrap: on
line diff
--- a/src/os/solaris/vm/os_solaris.cpp	Tue Dec 09 09:55:39 2008 -0500
+++ b/src/os/solaris/vm/os_solaris.cpp	Wed Dec 10 15:14:29 2008 -0800
@@ -3026,6 +3026,8 @@
 
 // Protect memory (Used to pass readonly pages through
 // JNI GetArray<type>Elements with empty arrays.)
+// Also, used for serialization page and for compressed oops null pointer
+// checking.
 bool os::protect_memory(char* addr, size_t bytes, ProtType prot,
                         bool is_committed) {
   unsigned int p = 0;
@@ -3049,7 +3051,7 @@
 }
 
 bool os::unguard_memory(char* addr, size_t bytes) {
-  return solaris_mprotect(addr, bytes, PROT_READ|PROT_WRITE|PROT_EXEC);
+  return solaris_mprotect(addr, bytes, PROT_READ|PROT_WRITE);
 }
 
 // Large page support