X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C86DE393A423 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1641984173; bh=1bJ84KU/oYsNZEztbTyrDHqTYFwQzRoX9kTtkwc/M+U=; h=Date:From:To:Subject:References:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Reply-To:From; b=MPx/8xCyXvHPBtM8zoL4JGe4pHqL9aCl+MDpacRhwMsc7olxF8TjsGVke9xfT2k2b duxH1WvIh7mrIuoDDt2TsiuifSeiT7uWFh/xIO7Kti6L7wN2HeStRBaXqzeAHD+rBr ibyWaKMctiPAXkT1SD9ahmXezQufuCiiHhzv0IDI= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 316BB393A410 Authentication-Results: sourceware.org; dmarc=fail (p=none dis=none) header.from=cygwin.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=cygwin.com Date: Wed, 12 Jan 2022 11:41:43 +0100 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: posix_spawn issues on i686 Message-ID: Mail-Followup-To: cygwin AT cygwin DOT com References: <0a091366-a949-d7d0-6ad1-030ddd11c7dc AT cornell DOT edu> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <0a091366-a949-d7d0-6ad1-030ddd11c7dc@cornell.edu> X-Provags-ID: V03:K1:cZy6qT9E5L/Ug/n6r8RE7pMgeuiO5ftaDIHbENSGmObG3rAnhbW HsNNkoiv8zJs1g/bJ2BCTKtL/ER3+MqiOV9V+9eKz7DPuPKoiCXX4cLepk4TPFRjRR56mVP tf7RYtQ97N+96jhJTHdO2EHGIYKEIS+mM6ogICAkFsJOXKh32IbCEuR2C2gTH1I7H1/W6CA +UwDmU0nL8YvYU6fh6zvw== X-UI-Out-Filterresults: notjunk:1;V03:K0:QCBeLjNniRc=:Rowy5y5BPS9Nd2MPwKREOt GfJLnTH0S5muazqLsJCxiez6yEJRwaM8CLNM2nOZza1WYpNV54kx/Tm7U2YPv5flNL9kK5VHD 4sPxUIprNaAYjx6IuMO0DL1+6kDetwjelGNuaLS+MohHBJDEPl2TIGBfQ6ukAzoboEBec8hFr CNhbw/hgsNsQ3nVdLlNlZDudX3oYY6sRsAdrMQW2p+AbzcGX4XPWGIbtDSY40gNsgCYJvDuGB W4lMxBaro37uVpNvH1kIGfpLb6OcmllZllFNkelMIjeunU+PjZp1dOZHHtIbFpwkOSzImCgip 0E3n70/E2EF/Dn7qCdI+lGY1mTist5f6Wgkw1QBB0b7RPyzptPHNn1CY8Zp2L6AwG0K3tO1Y0 T7+T10l/Q4LA8zayqTRq+zoA+g5KBc+7/VYfCWdaUVyTHdS1dZyQLBdTUZSonyxV33HTsGOEc Hynba77J5BLHP7VTY1LF6vjL/4DVZweLcGJMz66NdQZDWAwrlNfb45ZwO1O3oEP6TwdoGgbYB AhJecAaezn1FvyudUQtwE4kQDNQY/IYJ4+3981XDYR9hcSOdngLZtU1Qi5HtN8bL7MefY7nlQ 43EaxAF64mWcGxaPOkIwEAN/UePvAWcy1sZ5LVo2+RXI8z2XGR0CBnlKGol0gZNNNid2xW8Od bmpNAsnAqkpyL4McamVqTizaaM/G64Fvcw7Xy7KTe6qU5NeCtfqFOc6+ZlKVYYHcmBNAmo3iA t5fgo+kW4utmY8VY X-Spam-Status: No, score=-93.5 required=5.0 tests=BAYES_00, GOOD_FROM_CORINNA_CYGWIN, KAM_DMARC_NONE, KAM_DMARC_STATUS, KAM_NUMSUBJECT, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL, SPF_FAIL, SPF_HELO_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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: , Reply-To: cygwin AT cygwin DOT com 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" On Jan 11 16:08, Ken Brown wrote: > On 1/11/2022 1:45 PM, Jeremy Drake via Cygwin wrote: > > Sorry, I am not subscribed to the list so don't have the message to reply > > to for threading purposes, but attached please find a C reproducer that > > works on x86_64 but fails on i686. The particular issue seems to be the > > POSIX_SPAWN_RESETIDS flag - not setting that allows i686 to succeed too. Thanks for the STC, Jeremy! > I don't have time to check this carefully, but it looks to me like the > problem is that process_spawnattr calls setegid and seteuid instead of > setegid32 and seteuid32. This causes truncation of the gid and uid. You're right. Additionally the calls to getgid and getuid have to use the internal getgid32 and getuid32 functions. I'll apply a fix. Thanks guys! 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