Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2006-07-13 00:15:00 +0400
committerCorinna Vinschen <corinna@vinschen.de>2006-07-13 00:15:00 +0400
commitd44b979536f0e922713ab132a871c062f61ea376 (patch)
tree3cbd9d279765bfac1d833ce83860814f30e3d578
parent26339428587309790f56ba4127f9f38166928815 (diff)
* mmap.cc (mmap_record::alloc_page_map): Don't call VirtualProtect
on maps created with MAP_NORESERVE.
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/mmap.cc2
2 files changed, 6 insertions, 1 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index a91fbf430..0ff39df4d 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,5 +1,10 @@
2006-07-12 Corinna Vinschen <corinna@vinschen.de>
+ * mmap.cc (mmap_record::alloc_page_map): Don't call VirtualProtect
+ on maps created with MAP_NORESERVE.
+
+2006-07-12 Corinna Vinschen <corinna@vinschen.de>
+
* include/pthread.h: Define PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT and
PTHREAD_PRIO_PROTECT only if _POSIX_THREAD_PRIO_INHERIT is defined.
diff --git a/winsup/cygwin/mmap.cc b/winsup/cygwin/mmap.cc
index cee1a814f..7ca176c88 100644
--- a/winsup/cygwin/mmap.cc
+++ b/winsup/cygwin/mmap.cc
@@ -574,7 +574,7 @@ mmap_record::alloc_page_map ()
DWORD start_protect = gen_create_protect ();
DWORD real_protect = gen_protect ();
- if (real_protect != start_protect
+ if (real_protect != start_protect && !noreserve ()
&& !VirtualProtect (get_address (), get_len (),
real_protect, &start_protect))
system_printf ("Warning: VirtualProtect (addr: %p, len: 0x%x, "