Mercurial > hg > truffle
comparison src/share/vm/prims/jni.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 | 1fdb98a17101 |
children | 4db4e58c16bd |
comparison
equal
deleted
inserted
replaced
473:3ad2b8576c4a | 477:24fda36852ce |
---|---|
2171 static char* bad_address = NULL; | 2171 static char* bad_address = NULL; |
2172 if (bad_address == NULL) { | 2172 if (bad_address == NULL) { |
2173 size_t size = os::vm_allocation_granularity(); | 2173 size_t size = os::vm_allocation_granularity(); |
2174 bad_address = os::reserve_memory(size); | 2174 bad_address = os::reserve_memory(size); |
2175 if (bad_address != NULL) { | 2175 if (bad_address != NULL) { |
2176 os::protect_memory(bad_address, size, os::MEM_PROT_READ); | 2176 os::protect_memory(bad_address, size, os::MEM_PROT_READ, |
2177 /*is_committed*/false); | |
2177 } | 2178 } |
2178 } | 2179 } |
2179 return bad_address; | 2180 return bad_address; |
2180 } | 2181 } |
2181 | 2182 |