6727377: VM stack guard pages on Windows should PAGE_READWRITE not PAGE_EXECUTE_READWRITE

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
This commit is contained in:
Coleen Phillimore 2008-12-10 15:14:29 -08:00
parent 36f5b8dd54
commit e0d2bfab81
8 changed files with 21 additions and 14 deletions

View file

@ -3026,6 +3026,8 @@ static bool solaris_mprotect(char* addr, size_t bytes, int prot) {
// 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::guard_memory(char* addr, size_t bytes) {
}
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