Please have a look at the strace result. I still think it's Cygwin's bug.
Sent with Proton Mail secure email.
--- Forwarded Message ---
From: w6b7rk5yu4mt25v3
Date: On Sunday, February 19th, 2023 at 20:08
Subject: Re: Fw: Re: Fw: Re: Why do these mprotect always fail?
See strace:
544091 601347 [main] obr 1831 mprotect: mprotect (addr: 0xA0010, len
65536, prot 0x7)
59 601406 [main] obr 1831 mprotect: 0 = mprotect ()
166 601572 [main] obr 1831 mmap: addr 0x0, len 327680, prot 0x3, flags 0x22,
fd -1, off 0x0
123 601695 [main] obr 1831 mmap: 0x6FFF
en ; cygwin@cygwin.com
> Subject: [EXTERNAL] Re: Fw: Re: Fw: Re: Why do these mprotect always fail?
>
> On Feb 15 15:31, w6b7rk5yu4mt25v3 via Cygwin wrote:
> > I asked the developer of the interpreter. He said it's OK to use the
> > PAGE_SIZE value
> different than 40
On Feb 15 15:31, w6b7rk5yu4mt25v3 via Cygwin wrote:
> I asked the developer of the interpreter. He said it's OK to use the
> PAGE_SIZE value different than 4096. So I used this dirty hack:
>
> #ifndef __CYGWIN__
> #define PAGE_SIZE 4096
> #endif
>
> This means on Cygwin it will use the default P
ll, it's
Cygwin's quirks here.
Sent with Proton Mail secure email.
--- Forwarded Message ---
From: Oskar Skog via Cygwin
Date: On Wednesday, February 15th, 2023 at 20:02
Subject: Re: Fw: Re: Why do these mprotect always fail?
To: cygwin@cygwin.com
> On 2023-02-15 14:40, w6
On Feb 15 12:40, w6b7rk5yu4mt25v3 via Cygwin wrote:
> On Wednesday, February 15th, 2023 at 19:13, Corinna Vinschen wrote:
> > On Feb 15 11:14, w6b7rk5yu4mt25v3 via Cygwin wrote:
> > > Corinna Vinschen wrote:
> > >
> > > > cygwin-developers is for developers woking on Cygwin itself, not for
> > > >
On 2023-02-15 14:40, w6b7rk5yu4mt25v3 via Cygwin wrote:
You misunderstood what I said.
It's really just a naming conflict and a coincident. On the context of the
source code (it's an interpreter), PAGE_SIZE is indeed JIT_PAGE_SIZE (not the
system page size, but the page size defined internally
You misunderstood what I said.
It's really just a naming conflict and a coincident. On the context of the
source code (it's an interpreter), PAGE_SIZE is indeed JIT_PAGE_SIZE (not the
system page size, but the page size defined internally by the interpreter). On
Linux, the name doesn't conflict
On Feb 15 11:14, w6b7rk5yu4mt25v3 via Cygwin wrote:
> Corinna Vinschen wrote:
>
> > 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.
Subject: Re: Why do these mprotect always fail?
To: cygwin@cygwin.com
CC: w6b7rk5yu4mt25v3
> 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
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. T
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".
Sent with Proton Mail secure email.
mprotect 1:
unsigned char* buffer;
int32_t available, size;
if(size > PAGE_SIZE) {
factor = size / PAGE_SIZE + 1;
}
available = factor * PAGE_SIZE;
if(posix_memalign((void**)&buffer, PAGE_SIZE, available)) {
std::wcerr << L"Unable to allocate JIT m
13 matches
Mail list logo