Question about mprotect

Ken Brown kbrown@cornell.edu
Sat Jan 18 20:58:44 GMT 2025


Hi Corinna,

I'm puzzled by the code at mmap.cc:1294 starting with if (!in_mapped). 
If we get there and in_mapped is false, then the pages in the mprotect 
call don't meet any mmap_record.  Why do we continue after that?  Is 
there some case where a user program would expect mprotect to succeed on 
pages that were not mapped by mmap?  There must be some subtlety 
involving PAGE_WRITECOPY that I'm missing.

Thanks.

Ken


More information about the Cygwin-developers mailing list