DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 55RHkEpZ1527018 Authentication-Results: delorie.com; dmarc=pass (p=none dis=none) header.from=cygwin.com Authentication-Results: delorie.com; spf=pass smtp.mailfrom=cygwin.com DKIM-Filter: OpenDKIM Filter v2.11.0 delorie.com 55RHkEpZ1527018 Authentication-Results: delorie.com; dkim=pass (1024-bit key, unprotected) header.d=cygwin.com header.i=@cygwin.com header.a=rsa-sha256 header.s=default header.b=UphIrq8G X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E0C9E3854A8D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1751046372; bh=w/0DTvfeC/+KrJLi/DX8iQuBccXRVK2ak1Hm1w5hxqA=; h=Date:To:cc:Subject:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=UphIrq8GxOcFfHgnxwVxw6dtauV3Ip/MkfBWKXBx0WivsYyX83KcGx4pARtjnFg/3 NLiES5lpg5xWjhXTDPEI+7IXsyXRZ5gtIC7+PqIrHebseCQDfdPx96xwTH5MYWnJD7 zvIlG9QocueSOD+HuE6uTFTR1+xhQa5EGCVGWxi0= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8A2C738560BC ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 8A2C738560BC ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1751046316; cv=none; b=jsOeLbXPvhdQEAodEo0BC/g01f0eL5fEAaE7IGIctz3g7qWXDz02LQTkFq5n7GOsat4CcEm5z/TJMyYzv+XBAQXl34SczhSDhhoTTmS87ny/sBYeDMCJPIS4Wpxx/0wtgEARUghpoa2cDAi/INncLCxDo3BomVx5JVxGNhNmPoQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1751046316; c=relaxed/simple; bh=gyKlfJB/vSUuiykvi0utEfB7ImI+48FRzc3C6T5qcCg=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=T5Z4Pqu5q8Ek4uT8AZ9GTfpzzW1dLT28Xb2Q4ic9s6p7AeYgUt+EzO+Y5KifDphMMnOK5CagRoZCKgrtTZ9eWy/XwIG+rWFQHCwuU2XZ2mRUZOjlHNP8uuSf2F8aBRSqcWxKWwxUqwIbMCJu+fMWPGhYMleMCe9RLUkXCLP1Vh4= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8A2C738560BC Date: Fri, 27 Jun 2025 10:45:16 -0700 (PDT) X-X-Sender: jeremyd AT resin DOT csoft DOT net To: Corinna Vinschen via Cygwin cc: Pip Cet Subject: Re: XSAVE-related segfaults observed under wine In-Reply-To: Message-ID: References: <87bjq9457k DOT fsf AT protonmail DOT com> MIME-Version: 1.0 X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.30 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Jeremy Drake via Cygwin Reply-To: Jeremy Drake 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 Fri, 27 Jun 2025, Corinna Vinschen via Cygwin wrote: > Hi Pip, > > On Jun 27 14:41, Pip Cet via Cygwin wrote: > > My suggested fix is to align the value in %rbx to the next 64-byte > > multiple after the "cpuid" instruction is executed, by performing the > > assembler equivalent of $rbx += 63; $rbx &= -64; I tried this: > > > > diff --git a/winsup/cygwin/scripts/gendef b/winsup/cygwin/scripts/gendef > > index 861a2405b..d681fde3f 100755 > > --- a/winsup/cygwin/scripts/gendef > > +++ b/winsup/cygwin/scripts/gendef > > @@ -232,6 +232,8 @@ sigdelayed: > > movl \$0x0d,%eax > > xorl %ecx,%ecx > > cpuid # get necessary space for xsave > > + addq \$63, %rbx > > + andq \$-64, %rbx # align to next 64-byte multiple > > what about a oneliner instead by just aligning rsp? As in > > > movq %rbx,%rcx > > addq \$0x48,%rbx # 0x18 for alignment, 0x30 for additional space If aligning via andq, does the 0x18 "for alignment" still need to be included? > > subq %rbx,%rsp > > + andq \$-64, %rsp > -- 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