diff src/os_cpu/solaris_x86/vm/os_solaris_x86.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 7b920868b475
children 0fbdb4381b99 22e09c0f4b47
line wrap: on
line diff
--- a/src/os_cpu/solaris_x86/vm/os_solaris_x86.cpp	Tue Dec 09 09:55:39 2008 -0500
+++ b/src/os_cpu/solaris_x86/vm/os_solaris_x86.cpp	Wed Dec 10 15:14:29 2008 -0800
@@ -576,10 +576,11 @@
       if (addr != last_addr &&
           (UnguardOnExecutionViolation > 1 || os::address_is_in_vm(addr))) {
 
-        // Unguard and retry
+        // Make memory rwx and retry
         address page_start =
           (address) align_size_down((intptr_t) addr, (intptr_t) page_size);
-        bool res = os::unguard_memory((char*) page_start, page_size);
+        bool res = os::protect_memory((char*) page_start, page_size,
+                                      os::MEM_PROT_RWX);
 
         if (PrintMiscellaneous && Verbose) {
           char buf[256];