X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 146863858284 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1676459746; bh=0TViDZIlzTI392AGpX9lPZT8aiRoDinBYZwQhlzjpYQ=; 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=HKGRcmv8DQQeXANvGgZvrQF446/ZGCzzV5r5JlAOOn8Qe24rv3HqFHtXy1EhmsW3D BnMBJlbMn1cKslkvG/PPIw3eZD+dDkCtEuvBO605aDssQf6oEl3H60VNWVL+dWZD9k 3oZG/f+ecXjuDPrK10HI55vSRAq2ddyaYCx1TANw= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org DB4593858CDB Date: Wed, 15 Feb 2023 11:14:53 +0000 To: "cygwin AT cygwin DOT com" Subject: Fw: Re: Why do these mprotect always fail? Message-ID: In-Reply-To: References: Feedback-ID: 67221101:user:proton MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham 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 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: w6b7rk5yu4mt25v3 via Cygwin Reply-To: w6b7rk5yu4mt25v3 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com Sender: "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.com/pipermail/cygwin-developers/2020-July/011913.html https://cygwin.com/pipermail/cygwin/2002-January/068158.html This problem is well known at least. Sent with Proton Mail secure email. ------- Forwarded Message ------- From: Corinna Vinschen Date: On Wednesday, February 15th, 2023 at 17:32 Subject: Re: Why do these mprotect always fail? To: cygwin AT cygwin DOT 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 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. > > > Corinna > > > () https://cygwin.com/acronyms/#STC -- 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