delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2025/05/16/17:38:37

DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 54GLcann041452
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 54GLcann041452
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=ytSeCU+R
X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 63003385841C
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1747431515;
bh=50tfqfOKk9wceo8C1w3p8kjUMnL14+LwnQzI+eKMBHY=;
h=Date:Subject:To:References:In-Reply-To:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:
From;
b=ytSeCU+RcWtF2WtPI4xiHZM1PfqQFTlU9jqU9OVh2fS1kkof26NbVmZpYPBI/HRRp
f24V2DBqQCA5VUzAEaciBujJs5X+4l+BJOQfiD2nYkhJjOjwAKVMACXmRTbesEGRwJ
u9lq+EhtR/gXHeTV6znxaJ6WkNKfg+8S5t5C0u38=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 02BFC3858415
ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 02BFC3858415
ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1747431488; cv=none;
b=R/3mtGnEa7zVdomNfmgA2nsU68VYaph6T2C6INO7dhNYjA6jobaD+ap4+6B49T9LVzUPZ7tdjoj5a/hBOsFTynMcWY33+rRkAANylFLXJ6wYC7ysmD1PFoBVHVhZjAZObdER1SeAz54/+OB5eVZ3xcyQOBAY2hXt0rWnw4Ovy60=
ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key;
t=1747431488; c=relaxed/simple;
bh=i+fhX33rEFzP5/FQCAiIKU6MRg507yXQcPZ9nPU/mW8=;
h=Message-ID:Date:MIME-Version:Subject:To:From;
b=mhMGNdYZ1e7o+aW6pDUvtWVdlR113iqhzPHO55rTI9cKalBPigPh1EGBlieYOeux6OF9yOLARI3E5bFAhF/Jnij/r3oELsuqR4cvbLVsGi+IB9HUZX5D7YvsBRKbXdSrjFCitlBfNtDBBlIOw+54st2zJ17prPlobAc3AssDqz4=
ARC-Authentication-Results: i=1; server2.sourceware.org
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 02BFC3858415
X-SNCR-Rigid: 67D89E7C06CDC873
X-Originating-IP: [81.129.146.154]
X-OWM-Source-IP: 81.129.146.154
X-OWM-Env-Sender: jon DOT turney AT dronecode DOT org DOT uk
X-RazorGate-Vade: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdefudefkeehucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuueftkffvkffujffvgffngfevqffopdfqfgfvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefkffggfgfuvfhfhfgjtgfgsehtjeertddtvdejnecuhfhrohhmpeflohhnucfvuhhrnhgvhicuoehjohhnrdhtuhhrnhgvhiesughrohhnvggtohguvgdrohhrghdruhhkqeenucggtffrrghtthgvrhhnpeeigfegkefgleelleegteeugfefjedtieegvdehuedvhfejffegteeftdekjedthfenucffohhmrghinheptgihghifihhnrdgtohhmnecukfhppeekuddruddvledrudegiedrudehgeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhephhgvlhhopegludelvddrudeikedruddruddtlegnpdhinhgvthepkedurdduvdelrddugeeirdduheegpdhmrghilhhfrhhomhepjhhonhdrthhurhhnvgihsegurhhonhgvtghouggvrdhorhhgrdhukhdprhgvvhfkrfephhhoshhtkeduqdduvdelqddugeeiqdduheegrdhrrghnghgvkeduqdduvdelrdgsthgtvghnthhrrghlphhluhhsrdgtohhmpdgruhhthhgpuhhsvghrpehjohhnthhurhhnvgihsegsthhinhhtvghrnhgvthdrtghomhdpghgvohfkrfepifeupdfovfetjfhoshhtpegsthhprhgurhhgohdtuddvpdhnsggprhgtphhtthhopedvpdhrtghp
thhtoheptgihghifihhnsegthihgfihinhdrtghomhdprhgtphhtthhopehtrghkrghshhhirdihrghnohesnhhifhhthidrnhgvrdhjph
X-RazorGate-Vade-Verdict: clean 0
X-RazorGate-Vade-Classification: clean
X-VadeSecure-score: verdict=clean score=0/300, class=clean
Message-ID: <15add7ba-0a22-4dc7-ab78-8d2759f05c64@dronecode.org.uk>
Date: Fri, 16 May 2025 22:37:59 +0100
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: strace: infinite exception c0000005 loop on segmentation fault
To: Takashi Yano <takashi DOT yano AT nifty DOT ne DOT jp>,
The Cygwin Mailing List <cygwin AT cygwin DOT com>
References: <320ee4eb-a06d-150d-ef12-3dc501bbd60b AT t-online DOT de>
<20250516211400 DOT 84e5ff3351f557a313618ee7 AT nifty DOT ne DOT jp>
<20250517004342 DOT bb5af58ef1498179b3e91206 AT nifty DOT ne DOT jp>
In-Reply-To: <20250517004342.bb5af58ef1498179b3e91206@nifty.ne.jp>
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: Jon Turney via Cygwin <cygwin AT cygwin DOT com>
Reply-To: Jon Turney <jon DOT turney AT dronecode DOT org DOT uk>
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>

On 16/05/2025 16:43, Takashi Yano wrote:
> Hi Jon,
[...]
>>
>> I could reproduce that. And also found cygwin 3.4.10 does not have this
>> issue. I'll look into this.
> 
> I could bisect the issue and found the next commit triggered the issue.
> 
> commit 91457377d6c9f89a08b1b70e45cbae87ef467119
> Author: Jon Turney <jon DOT turney AT dronecode DOT org DOT uk>
> Date:   Thu Jan 11 20:00:14 2024 +0000
> 
[...]

Thanks for looking into this.

> I also found the following patch fixes the issue. I'm not sure
> this is the right thing, so could you please have a look?
> 
> diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc
> index 9763a1b04..aea2821f6 100644
> --- a/winsup/cygwin/exceptions.cc
> +++ b/winsup/cygwin/exceptions.cc
> @@ -597,7 +597,7 @@ try_to_debug ()
>       {
>         extern void break_here ();
>         break_here ();
> -      return 1;
> +      return 0;
>       }
>   
>     /* Otherwise, invoke the JIT debugger, if set */

Hmm... at this remove in time, I'm not sure why I made that change.

Well, "consistently return non-zero from try_to_debug() if we debugged", 
but maybe that misunderstands the meaning of the return value...

(I'm not sure what the pure bafflegab at the end of exception::handle() 
does to make things work differently, we exit with 
ExceptionContinueExecution in both cases.)

I think this is similar to/related to the problem [1], which I 
unfortunately never got around to investigating properly.

I think perhaps we should probably also restore the behavior of not 
trying to break_here() (==DebugBreak()) if no JIT debugger is 
configured. (i.e. try_to_debug() should just immediately return 0, if 
debugger_command is NULL).

(This would seem to make try_to_debug() less useful, as it then does 
nothing if you're just run under gdb, but it's what the code used to do...)

I'll put together a patch tomorrow.


[1] https://cygwin.com/pipermail/cygwin/2024-May/256058.html


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