1.1 --- a/src/os/bsd/vm/os_bsd.cpp Mon Apr 29 16:36:17 2013 -0400 1.2 +++ b/src/os/bsd/vm/os_bsd.cpp Mon Apr 29 11:03:49 2013 -0700 1.3 @@ -2080,9 +2080,10 @@ 1.4 flags |= MAP_FIXED; 1.5 } 1.6 1.7 - // Map uncommitted pages PROT_READ and PROT_WRITE, change access 1.8 - // to PROT_EXEC if executable when we commit the page. 1.9 - addr = (char*)::mmap(requested_addr, bytes, PROT_READ|PROT_WRITE, 1.10 + // Map reserved/uncommitted pages PROT_NONE so we fail early if we 1.11 + // touch an uncommitted page. Otherwise, the read/write might 1.12 + // succeed if we have enough swap space to back the physical page. 1.13 + addr = (char*)::mmap(requested_addr, bytes, PROT_NONE, 1.14 flags, -1, 0); 1.15 1.16 if (addr != MAP_FAILED) {