I discovered the problems why the program I'm trying to port crashed

2023-02-20 Thread w6b7rk5yu4mt25v3 via Cygwin
Quoted from https://cygwin.com/pipermail/cygwin-cvs/2020q3/014516.html: "The file mapping will be only a single page, 4K, and since 64 bit systems don't support the AT_ROUND_TO_PAGE flag, the remainder of the 64K slot will result in a SEGV when accessed." "The justification is that there's very

Fw: Re: Fw: Re: Fw: Re: Why do these mprotect always fail?

2023-02-20 Thread w6b7rk5yu4mt25v3 via Cygwin
re email. > > > --- Original Message --- > On Wednesday, February 15th, 2023 at 23:33, Corinna Vinschen > corinna-cyg...@cygwin.com wrote: > > > > > On Feb 15 15:31, w6b7rk5yu4mt25v3 via Cygwin wrote: > > > > > I asked the developer of the inte

Re: Fw: Re: Fw: Re: Why do these mprotect always fail?

2023-02-20 Thread w6b7rk5yu4mt25v3 via Cygwin
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 > > #en

Fw: Re: Fw: Re: Why do these mprotect always fail?

2023-02-15 Thread w6b7rk5yu4mt25v3 via Cygwin
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

Re: Fw: Re: Why do these mprotect always fail?

2023-02-15 Thread w6b7rk5yu4mt25v3 via Cygwin
h, 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 > > > developers using Cygwin to develop something else. I d

Fw: Re: Why do these mprotect always fail?

2023-02-15 Thread w6b7rk5yu4mt25v3 via Cygwin
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 never

Re: Why do these mprotect always fail?

2023-02-15 Thread w6b7rk5yu4mt25v3 via Cygwin
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.

Why do these mprotect always fail?

2023-02-15 Thread w6b7rk5yu4mt25v3 via Cygwin
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