X-Recipient: archive-cygwin@delorie.com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EB8313858284
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
	s=default; t=1676457216;
	bh=MGyqqXYMyE/qm2ZclAUopz8ubbwG5DaLO6tpdCeluwc=;
	h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe:
	 List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:
	 From;
	b=n62p+zAoAEntfjIcDWfMA1VfeB6os68RXqR0bW9slRXnLXtPHXd/2QNIH6A9tHw7Q
	 QLtX00RLmJ7JAKgnbAE9Xy4MigB8VzCYRnOA1xIEbUBtdW8TU/sXzTHNDPuqZa4aO3
	 XZF0u13aEi9+Jt2o43dR8GqGYyGng2g4UySU4b+0=
X-Original-To: cygwin@cygwin.com
Delivered-To: cygwin@cygwin.com
Date: Wed, 15 Feb 2023 11:32:45 +0100
To: cygwin@cygwin.com
Subject: Re: Why do these mprotect always fail?
Message-ID: <Y+y0zRQWVRWBkhCX@calimero.vinschen.de>
Mail-Followup-To: cygwin@cygwin.com,
 w6b7rk5yu4mt25v3 <w6b7rk5yu4mt25v3@protonmail.com>
References: <yxifinJpR7DQ4XDFwpYMrUknNpsg8wu5T1KYPeNIwjf3FL_lYou0whmzg-XCoFgYlcz96k0yEjkrxCOQOOTztnk_tvW7ZNi8_riHbsOn-ZU=@protonmail.com>
 <ruVqVpKyYTyh3m-4mzaAg2pyhJAqlamcbUYKB8ghh_LwAKIqpabv0LNqlt8_Owfzx0Hc6c1C6nJE4Czf4hod2ukAWe3b6p_WAaaGLPk7CI8=@protonmail.com>
MIME-Version: 1.0
Content-Disposition: inline
In-Reply-To: <ruVqVpKyYTyh3m-4mzaAg2pyhJAqlamcbUYKB8ghh_LwAKIqpabv0LNqlt8_Owfzx0Hc6c1C6nJE4Czf4hod2ukAWe3b6p_WAaaGLPk7CI8=@protonmail.com>
X-Provags-ID: V03:K1:rLjD+x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, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE,
 RCVD_IN_MSPIKE_H2, SPF_FAIL, SPF_HELO_NONE,
 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@cygwin.com
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-request@cygwin.com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=subscribe>
From: Corinna Vinschen via Cygwin <cygwin@cygwin.com>
Reply-To: cygwin@cygwin.com
Cc: Corinna Vinschen <corinna-cygwin@cygwin.com>,
        w6b7rk5yu4mt25v3 <w6b7rk5yu4mt25v3@protonmail.com>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: cygwin-bounces+archive-cygwin=delorie.com@cygwin.com
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie.com@cygwin.com>


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
