Why do these mprotect always fail?
Wed Feb 15 10:32:45 GMT 2023
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.
More information about the Cygwin