delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2025/03/08/06:08:32

DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 528B8VOS1422842
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 528B8VOS1422842
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=MfJTym6a
X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 20067385840C
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1741432111;
bh=NFdcdEXLVVb+YdNeWIKQ7ePQp/08Wph8TzwTX+iyo6s=;
h=Subject:To:References:Date:In-Reply-To:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:
From;
b=MfJTym6alax6JawJwGWZBPDhE2A5wZFgaMgh7rz/bS9iz4/VZMj6g4FteexyIjDEW
gsGuAAvf99kgSJLYZcsemJ4fzEYhr0ZIvWqUdiUOfgvKm8V8W2AKcmTOhZmJZvyeTa
L2wyPDJNqhdjMC3OU3Z6033Utdau/IsJsZm5WyX4=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2E8A33858D1E
ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 2E8A33858D1E
ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1741432054; cv=none;
b=LER5jzcudC7TSIkwKvdito5CknBoI4THnHrXAIWL7Axxc+QAZZfpcQRB0L9LXeAzarbs/wpMEDyWwitiEMNbBRXDC+39zTJLqTyfeW/zEUUvSIWPnvUOp2I5FfeMZwcP7zGNvTvBsbEXCdoUZk1McoWic//C4HEe9rp0XHA3A/0=
ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key;
t=1741432054; c=relaxed/simple;
bh=R6aRTjqEaZgl6I8OlhnPPIv0H+sUnML4kQNQ6HkJZ8M=;
h=Subject:To:From:Message-ID:Date:MIME-Version;
b=K2JO+wCD+Lfc1cSZKuvBQXvE8nnxBhmzQCFFSwRX3Mp4ovC4QFR7S9cuorD0/3qznNh5UNfbzttIa0l0hFl/0naug5YmsfBKLCZvvvuybPV1f8cSFBe9OJ59KqNFB+TEFfhZs7l0Tuy9nZ3D5+iVLjQjHTrpCdZr5npQ6TIUIv8=
ARC-Authentication-Results: i=1; server2.sourceware.org
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2E8A33858D1E
Subject: Re: cygwin 3.6.0: No signals received after swapcontext() is used
To: cygwin AT cygwin DOT com
References: <ec6e2050-953f-0d47-c385-cfa598566291 AT t-online DOT de>
<Z8nxYCxthcsMVqzL AT calimero DOT vinschen DOT de>
Message-ID: <bf4eb7e1-66e3-e1f9-67e2-c4d4a75ff6c8@t-online.de>
Date: Sat, 8 Mar 2025 12:07:32 +0100
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:128.0) Gecko/20100101
SeaMonkey/2.53.20
MIME-Version: 1.0
In-Reply-To: <Z8nxYCxthcsMVqzL@calimero.vinschen.de>
X-TOI-EXPURGATEID: 150726::1741432051-8DFF89EA-703EBD22/0/0 CLEAN NORMAL
X-TOI-MSGID: 9e543458-ce03-4801-a0e9-70bc4d43ee47
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: Christian Franke via Cygwin <cygwin AT cygwin DOT com>
Reply-To: cygwin AT cygwin DOT com
Cc: Christian Franke <Christian DOT Franke AT t-online DOT de>
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 528B8VOS1422842

Corinna Vinschen via Cygwin wrote:
> On Mar  6 13:24, Christian Franke via Cygwin wrote:
>> Found because 'stress-ng --context 1 ...' always hangs.
>>
>> The attached testcase uses the example from Linux swapcontext(3) to call the
>> context functions.
> Just tested with 3.5.3 and it doesn't work there, either.
>
> So yeah, it's a bug, but it's not a 3.6 regression and of minor
> importance.  We can look into that for 3.7.
>

This is possibly a regression introduced in 3.0.6. A comparison of 
strace outputs of signal handling before and after the swapcontext() 
calls reveals that 'incyg' is incorrectly set after swapcontext(). A 
revert of
   https://cygwin.com/git/?p=newlib-cygwin.git;a=commit;h=c5f9eed1
fixes both the testcase and 'stress-ng --context ...'.

No patch provided because I'm not sure how to handle the (at least) two 
other use cases of setcontext() correctly:
- the call from _cygtls::call_signal_handler(), and
- a call from a signal handler.

-- 
Regards,
Christian


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