delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2023/02/20/05:30:29

X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AED78382CD67
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1676888988;
bh=8iUyM4dFOOJWg0F9r9uIAwXoxN8wcj76rAf+RJ1B5ls=;
h=Date:To:Subject:In-Reply-To:References:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:
From;
b=XQnMWkcaZzxJ1sOxI6H6V5W5/bk5BjjgDf3uuKEOjYG4PA6jiNDf8DHc0h7Vk0LMq
HDcqXwXrwkKvf9J/t/TMO0VX5FpgtYntRO2JcQ1xSrgJuAVXlXVAohEGCe3I/G8vjC
/gBwLOZmVACNq/HWjRZeiz9ZAa7RB3oIqQorEwUA=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8D6C33834E24
Date: Sun, 19 Feb 2023 15:40:40 +0000
To: "cygwin AT cygwin DOT com" <cygwin AT cygwin DOT com>
Subject: Fw: Re: Fw: Re: Fw: Re: Why do these mprotect always fail?
Message-ID: <Mw5ZwraP57eZm8KVow8mO9_G9MUG1HxM76CHotK7rmIPG5Hn_uXu9AK77O7MXKd4Tw25hJSzdSFu8WKR6hiA-HtogekHAlJLixJFtRGytPY=@protonmail.com>
In-Reply-To: <2sLxaK-alDruU1hBajs4HCL82MYIxVHQqam2ogOcvGixLJ8yhI1avBVKiKANKAL-nLPBqLdkttsufxIpZ9cupOz3tPgT8heQSbIp0XmVT4s=@protonmail.com>
References: <yxifinJpR7DQ4XDFwpYMrUknNpsg8wu5T1KYPeNIwjf3FL_lYou0whmzg-XCoFgYlcz96k0yEjkrxCOQOOTztnk_tvW7ZNi8_riHbsOn-ZU=@protonmail.com>
<ruVqVpKyYTyh3m-4mzaAg2pyhJAqlamcbUYKB8ghh_LwAKIqpabv0LNqlt8_Owfzx0Hc6c1C6nJE4Czf4hod2ukAWe3b6p_WAaaGLPk7CI8=@protonmail.com>
<Y+y0zRQWVRWBkhCX AT calimero DOT vinschen DOT de>
<TlepM9ESIu1ZpPCpz1vzmSoBKsKnuUABID2BREun8gb9tEPApKByf5s-_DHR9C6h48OdPFnU5uZ0Xc4JTTd-gtPH2RqhOHgOiSh-spI9K88=@protonmail.com>
<Y+zMcAP/eIZ1DTi8 AT calimero DOT vinschen DOT de>
<0Qjpbo0t_1WTd9--kVw5gLR1PdJzG7myKYzhxdzDIqnWYwLnywFCtSbekykskWViaSJM_bcLQBEFT_wg4-IApgEYrX5bHFIZH7Ro40oDYGs=@protonmail.com>
<d594b5d0-8810-c752-97ff-a28b2524552f AT oskog97 DOT com>
<3HScWpQC8pjnPC4OBYIhgMMGaPTBCH_T8o8mMC72UMMMgtodqjjUCRpC81hW8SF9PUk-e3rmxeI8y45aaOGTrZ1MFu7FK3tJ-3XXclG2i3I=@protonmail.com>
<Y+0JTyNpVqvpZvW0 AT calimero DOT vinschen DOT de>
<2sLxaK-alDruU1hBajs4HCL82MYIxVHQqam2ogOcvGixLJ8yhI1avBVKiKANKAL-nLPBqLdkttsufxIpZ9cupOz3tPgT8heQSbIp0XmVT4s=@protonmail.com>
Feedback-ID: 67221101:user:proton
MIME-Version: 1.0
X-Spam-Status: No, score=-1.0 required=5.0 tests=BAYES_00, DATE_IN_PAST_12_24,
DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF,
FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, SPF_HELO_PASS, SPF_PASS,
TXREP autolearn=no autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on
server2.sourceware.org
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: w6b7rk5yu4mt25v3 via Cygwin <cygwin AT cygwin DOT com>
Reply-To: w6b7rk5yu4mt25v3 <w6b7rk5yu4mt25v3 AT protonmail DOT com>
Errors-To: cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com>

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 <w6b7rk5yu4mt25v3 AT protonmail DOT com>
Date: On Sunday, February 19th, 2023 at 20:08
Subject: Re: Fw: Re: Fw: Re: Why do these mprotect always fail?
To: cygwin AT cygwin DOT com <cygwin AT cygwin DOT com>


> See strace:
> 
> 544091 601347 [main] obr 1831 mprotect: mprotect (addr: 0xA00100000, 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: 0x6FFFFFFB0000 = mmap()
> 95 601790 [main] obr 1831 mprotect: mprotect (addr: 0x6FFFFFFC0000, len 196608, prot 0x7)
> 88 601878 [main] obr 1831 mprotect: 0 = mprotect ()
> 255 602133 [main] obr 1831 mmap: addr 0x0, len 393216, prot 0x3, flags 0x22, fd -1, off 0x0
> 102 602235 [main] obr 1831 mmap: 0x6FFFFFF50000 = mmap()
> 108 602343 [main] obr 1831 mprotect: mprotect (addr: 0x6FFFFFF60000, len 262144, prot 0x7)
> 47 602390 [main] obr 1831 mprotect: 0 = mprotect ()
> 245 602635 [main] obr 1831 mmap: addr 0x0, len 458752, prot 0x3, flags 0x22, fd -1, off 0x0
> 44 602679 [main] obr 1831 mmap: 0x6FFFFFEE0000 = mmap()
> 46 602725 [main] obr 1831 mprotect: mprotect (addr: 0x6FFFFFEF0000, len 327680, prot 0x7)
> 39 602764 [main] obr 1831 mprotect: 0 = mprotect ()
> --- Process 3796 (pid: 1831), exception c0000005 at 0000000a00100061
> --- Process 3796 (pid: 1831) thread 2928 exited with status 0xc0000005
> --- Process 3796 (pid: 1831) exited with status 0xc0000005
> Segmentation fault
> 
> I still think it's Cygwin's bug.
> 
> Sent with Proton Mail secure email.
> 
> 
> ------- Original Message -------
> On Wednesday, February 15th, 2023 at 23:33, Corinna Vinschen corinna-cygwin AT cygwin DOT com wrote:
> 
> 
> 
> > 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 PAGE_SIZE defined on limits.h (I'm taking advantage of the naming conflict here so I don't have to rename PAGE_SIZE to JIT_PAGE_SIZE as suggested by the developer of the interpreter).
> > > 
> > > The result is it's no longer error with "Unable to mprotect" but will
> > > silently crashed without any error messages printed on the screen. So
> > > after all, it's Cygwin's quirks here.
> > 
> > I still think it's a bug in the code which requires some debugging effort
> > on your side.
> > 
> > Having said that, if it's actually a Cygwin bug and you want it fixed,
> > please provide a simple, self-contained testcase in plain C, with a
> > minimum of code to reproduce the issue, and which compiles OOTB.
> > 
> > Corinna

-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019