Fw: Re: Why do these mprotect always fail?

w6b7rk5yu4mt25v3 w6b7rk5yu4mt25v3@protonmail.com
Wed Feb 15 11:14:53 GMT 2023


PAGE_SIZE is just a naming conflict. If you change it to something else, JIT_PAGE_SIZE for example, it still fails. The problem is Cygwin is not fine with the particular value 4096 but the program needs the value to be exactly 4096. About why I also sent to developer list, see:

https://cygwin.com/pipermail/cygwin-developers/2020-July/011913.html

https://cygwin.com/pipermail/cygwin/2002-January/068158.html

This problem is well known at least.

Sent with Proton Mail secure email.

------- Forwarded Message -------
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
Date: On Wednesday, February 15th, 2023 at 17:32
Subject: Re: Why do these mprotect always fail?
To: cygwin@cygwin.com <cygwin@cygwin.com>
CC: w6b7rk5yu4mt25v3 <w6b7rk5yu4mt25v3@protonmail.com>


> cygwin-developers is for developers woking on Cygwin itself, not for
> developers using Cygwin to develop something else. I dropped the ML
> from the recipient list.
> 
> And please don't top-post. Thanks.
> 
> On Feb 15 09:43, w6b7rk5yu4mt25v3 via Cygwin wrote:
> 
> > Almost forgot, PAGE_SIZE is set to 4096. This is a Linux application,
> > when I compile on Cygwin it complained that PAGE_SIZE is redefined but
> > the compilation was success nevertheless. Only when I run the
> > application, I always exited with "Unable to mprotect".
> 
> 
> PAGESIZE is 64K on Cygwin. If you change that, it breaks and you can
> keep the pieces.
> 
> It would be nice to send a complete, self-contained STC() in plain C,
> so reproducing your issue is simple and doesn't require to rework
> your code to get a running, debuggable testcase.
> 
> 
> Corinna
> 
> 
> () https://cygwin.com/acronyms/#STC


More information about the Cygwin mailing list