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

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.

Re: Why do these mprotect always fail?

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

Fw: Re: Why do these mprotect always fail?

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

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

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

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

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

RE: Changing the python sqlite3 version to the latest

2023-02-15 Thread Jose Isaias Cabrera via Cygwin
On February 14, 2023 8:46 PM, Jose Isaias Cabrera expressed: > > > On Tuesday, February 14, 2023 5:58 PM, Marco Atzeri expressed: > > > > On 11.02.2023 22:37, Jose Isaias Cabrera via Cygwin wrote: > > > > > > Greetings. > > > > > > If I install python39 and thus, > > > $ python > > > Python 3.9

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

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

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

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

Re: [ANNOUNCEMENT] Updated: dash 0.5.12-2

2023-02-15 Thread Corinna Vinschen via Cygwin
Hi Brian, On Feb 13 20:37, Corinna Vinschen via Cygwin wrote: > On Feb 13 12:03, Brian Inglis via Cygwin wrote: > > On 2023-02-13 10:43, ASSI via Cygwin wrote: > > > Corinna Vinschen via Cygwin writes: > > > > Can you give me an example? I'm a bit puzzled because fnmatch as well > > > > as glob i

Re: [ANNOUNCEMENT] Updated: dash 0.5.12-2

2023-02-15 Thread Corinna Vinschen via Cygwin
Oh, I'm an idiot. On Feb 15 14:52, Corinna Vinschen via Cygwin wrote: > Hi Brian, > [...] > The currently building cygwin test release 3.5.0-0.174.gd6d4436145b8 > contains the new code. Would you mind to build a dash for testing so we > can see if and how it works? You don't have to build a new

[ANNOUNCEMENT] Updated: GraphicsMagick-1.3.40-1

2023-02-15 Thread Marco Atzeri via Cygwin-announce via Cygwin
Version 1.3.40-1 of GraphicsMagick libGraphicsMagick-devel libGraphicsMagick3 libGraphicsMagick++12 libGraphicsMagickWand2 perl-Graphics-Magick have been uploaded for cygwin CHANGES Upstream security and bug fixes release http://www.graphicsmagick.org/NEWS.html#january-14-2023

[ANNOUNCEMENT] Updated: mutt-2.2.9-1

2023-02-15 Thread Marco Atzeri via Cygwin-announce via Cygwin
New version 2.2.9-1 of mutt is available in the Cygwin distribution: CHANGES Last upstream bugfix update release. Full details on: https://gitlab.com/muttmua/mutt/raw/master/UPDATING DESCRIPTION The Mutt E-Mail Client "All mail clients suck. This one just sucks less." Mutt is a small but v

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

2023-02-15 Thread w6b7rk5yu4mt25v3 via Cygwin
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 PAGE_SIZE defined on limits.h (I'm taking advantage of the naming co

Re: Changing the python sqlite3 version to the latest

2023-02-15 Thread Andrey Repin via Cygwin
Greetings, Jose Isaias Cabrera! > In case anyone needs the answer, These steps worked for me: > -- Downloaded the Pre-release Snapshots > $ wget https://sqlite.org/snapshot/sqlite-snapshot-202302131932.tar.gz > -- untared the snapshot > $ tar xvf sqlite-snapshot-202302131932.tar.gz > -- cd to t

Re: [ANNOUNCEMENT] Updated: dash 0.5.12-2

2023-02-15 Thread Andrey Repin via Cygwin
Greetings, Corinna Vinschen via Cygwin! > On Feb 15 14:52, Corinna Vinschen via Cygwin wrote: >> Hi Brian, >> [...] >> The currently building cygwin test release 3.5.0-0.174.gd6d4436145b8 >> contains the new code. Would you mind to build a dash for testing so we >> can see if and how it works? >

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

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

RE: [EXTERNAL] Re: Fw: Re: Fw: Re: Why do these mprotect always fail?

2023-02-15 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C] via Cygwin
> I still think it's a bug in the code which requires some debugging effort > on your side. I think that OP does not understand that the page size constant is a property of the platform, and not something that can be redefined at will even though it's a macro. > > #ifndef __CYGWIN__ > > #define

Re: Changing the python sqlite3 version to the latest

2023-02-15 Thread Jose Isaias Cabrera via Cygwin
On Wednesday, February 15, 2023 10:55 AM, Andrey Repin  expressed: > > -- untared the snapshot > > $ tar xvf sqlite-snapshot-202302131932.tar.gz > > > -- cd to the untared directory > > $ cd sqlite-snapshot-202302131932 > > > $ ./configure --prefix=/usr > > > $ make install > > Don't forget to

Re: [ANNOUNCEMENT] Updated: dash 0.5.12-2

2023-02-15 Thread Brian Inglis via Cygwin
On 2023-02-15 07:05, Corinna Vinschen via Cygwin wrote: On Feb 15 14:52, Corinna Vinschen via Cygwin wrote: The currently building cygwin test release 3.5.0-0.174.gd6d4436145b8 contains the new code. Would you mind to build a dash for testing so we can see if and how it works? You don't have

[QUERY] Help With Semaphore Error on Windows : Cygwin

2023-02-15 Thread Yeo Kai Wei via Cygwin
Hi All, Could I request for some help on some code? I ran into an error with semaphores with some book code using Cygwin on Windows. The code will throw an error with sem_post(). I compiled it with gcc -o memwriter memwriter.c -lrt -lpthread $ ./memwriter Shared memory address: 0x6fff00

Re: Changing the python sqlite3 version to the latest

2023-02-15 Thread Andrey Repin via Cygwin
Greetings, Jose Isaias Cabrera! > On Wednesday, February 15, 2023 10:55 AM, Andrey Repin  expressed: >> > -- untared the snapshot >> > $ tar xvf sqlite-snapshot-202302131932.tar.gz >> >> > -- cd to the untared directory >> > $ cd sqlite-snapshot-202302131932 >> >> > $ ./configure --prefix=/usr