delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2025/06/27/15:19:21

DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 55RJJKKV1554307
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 55RJJKKV1554307
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=CTYjzcKS
X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8DF673856096
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1751051959;
bh=p9Sw2MkhiqPrqZA4/eZxwOWBxS/k11ql9dwDlpoJ9Y8=;
h=Date:Subject:To:References:In-Reply-To:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:
From;
b=CTYjzcKSVyFx0yF1iRngwhbSzpbRpVj3n36ft1+dEra4fowA1uVHbvW4R1ZhYQS7a
Zm3Y9bFOe4uBUwz8ivAxY3tbustYDGuHXoCZbscq+Po/myFlKXmiPUzBQ7mrCipPLJ
zwyqGor2tpf64P66/0FUZucj4OBcTyXu1nmMhvlE=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D2F813858408
ARC-Filter: OpenARC Filter v1.0.0 sourceware.org D2F813858408
ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1751051933; cv=none;
b=wya+0wWtL1+zCItX0+eEBRQtNkh/aUrKnx44NWAKRb8m+soI4YiNz+ewD6Gk1TkzoELoCuLIqOC3l44VpVRXGk+tSFAVfm3SIiiVa/VaujfX244kR8juEdSAzqGOESAxDlPAGhjZuCMySjyk1rHIUiflFQsM+h8zabKD3Rs5OLs=
ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key;
t=1751051933; c=relaxed/simple;
bh=ZH2DJE4Q8uQCsms3/AtjoMHDot8PHt4EykYr+V0Q3XE=;
h=Message-ID:Date:MIME-Version:From:Subject:To:DKIM-Signature;
b=EsIPO0bXT+EXNTdTHpsfdBs8PqfhQy4h/sQ87ESfUthjTdqk6uYjEr3gB8LWxpMSGKLKt/KJycVJux+jLdXej0ADumqgekQwDC4XKri63lKycmhnR7CHOMETwNZIAObr5a2KijRCbKFrzhQouiKXnUGwQH6z1FFJR3wwnGMFL3M=
ARC-Authentication-Results: i=1; server2.sourceware.org
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D2F813858408
Message-ID: <46d6401a-36dd-48ad-a6d4-ca9e0bae5927@SystematicSW.ab.ca>
Date: Fri, 27 Jun 2025 13:18:50 -0600
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: XSAVE-related segfaults observed under wine
To: cygwin AT cygwin DOT com
References: <87bjq9457k DOT fsf AT protonmail DOT com>
<aF60VympSWbCeu2n AT calimero DOT vinschen DOT de>
<abda5210-ba7f-a4a0-5c0c-880367fec254 AT jdrake DOT com>
Organization: Systematic Software
In-Reply-To: <abda5210-ba7f-a4a0-5c0c-880367fec254@jdrake.com>
X-Stat-Signature: rupa8ndzpogy1toes16towa7jb9dy1r1
X-Rspamd-Server: rspamout01
X-Rspamd-Queue-Id: 0A00C2002A
X-Session-Marker: 427269616E2E496E676C69734053797374656D6174696353572E61622E6361
X-Session-ID: U2FsdGVkX1+j6jPMZvPbPQjIDJzGUhbgcfwVlnSSAqg=
X-HE-Tag: 1751051931-136821
X-HE-Meta: U2FsdGVkX19NkOD/AwNiWMnAVMHF+lTso0hs2kdKoGcyGWG4pDDrZoPqxzMd1bPWDb4qoCH4GF0gz6XW0nPcD/HwKqMJRU0WhlfpZQS8afMMDiiHZXUCdmwvZ340S+4ruB+7EPHm0JtAWY9pZElUIuLwEPl7oE4PU60dc0ZzC3V6R4S5vbq+vMJ5R9P/SGw0mmXj0hE8lkfcaKP2QoDCzyAbajidNfxTl0LA4hBN5c/jiHohdVzxjlpMFeoX8Yks/CZvc+CZkzKkHDqEWFgKbIRdNpKQ3FzTtSkF/qyBKk6Ydjpmqy4fIyHgAHf9Jqdf0t96kFIQlEj+vni0bR7/I4C+SgHEUBKO
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.30
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: Brian Inglis via Cygwin <cygwin AT cygwin DOT com>
Reply-To: cygwin AT cygwin DOT com
Cc: Brian Inglis <Brian DOT Inglis AT SystematicSW DOT ab DOT ca>
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>
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 55RJJKKV1554307

On 2025-06-27 11:45, Jeremy Drake via Cygwin wrote:
> On Fri, 27 Jun 2025, Corinna Vinschen via Cygwin wrote:
>> 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?

I think that's a holdover from the non-xsave path above this section, and is the 
extra space needed here in the xsave path?
>>>   	subq	%rbx,%rsp
>>
>>    +     andq    \$-64, %rsp

-- 
Take care. Thanks, Brian Inglis              Calgary, Alberta, Canada

La perfection est atteinte                   Perfection is achieved
non pas lorsqu'il n'y a plus rien à ajouter  not when there is no more to add
mais lorsqu'il n'y a plus rien à retrancher  but when there is no more to cut
                                 -- Antoine de Saint-Exupéry

-- 
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