delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2020/08/15/23:54:29

X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5A7B0385703F
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1597550016;
bh=LEJUMRa/2FeTilaGH4gqEIdTCiG9ondlI3bq/a+3t38=;
h=Date:To:Subject:In-Reply-To:References:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:
From;
b=H9xwgikr9biOYJB+ad9uP9T9ImfD+N+tlPmOzzNicl+v0yyTfef3kYRZUbeJR1axF
KW/3+Jm4/oB4S855swcPc08o5INXzQWXTY3Xgi0lpAK8gBJfVTXXIpxcjUQMPar8m5
C4wWJRUnIvs3w1l6SY/ApLCP8jGHROmyQbbH4VaQ=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org C8CE03857C4A
DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-05.nifty.com 07G3qsOQ006219
X-Nifty-SrcIP: [124.155.38.192]
Date: Sun, 16 Aug 2020 12:53:06 +0900
To: cygwin AT cygwin DOT com
Subject: Re: unhandled C++ exceptions not propagating
Message-Id: <20200816125306.60dc246baf63d7f9fba60611@nifty.ne.jp>
In-Reply-To: <vritk0xzfpk6.fsf@gmail.com>
References: <vritk0xzfpk6 DOT fsf AT gmail DOT com>
X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.30; i686-pc-mingw32)
Mime-Version: 1.0
X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00, DKIM_SIGNED,
DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A,
RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4,
RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS,
TXREP autolearn=no autolearn_force=no version=3.4.2
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on
server2.sourceware.org
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.29
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: Takashi Yano via Cygwin <cygwin AT cygwin DOT com>
Reply-To: Takashi Yano <takashi DOT yano AT nifty DOT ne DOT jp>
Cc: David McFarland <corngood AT gmail DOT com>
Errors-To: cygwin-bounces AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces AT cygwin DOT com>

On Sat, 15 Aug 2020 20:38:01 -0300
David McFarland via Cygwin <cygwin AT cygwin DOT com> wrote:
> 
> I was just debugging a c++ app (b2 build system from boost), and noticed
> that it would appear to exit unexpectedly without an error.  This turned
> out to be when an unhandled C++ exception was thrown.
> 
> On a fresh install of cygwin with gcc-g++, this program will throw an
> exception from the std::string constructor:
> 
> c++ -x c++ - <<END
> #include <string>
> int main() { std::string str(nullptr); return 0; }
> END
> 
> When it's executed from the shell it returns zero, but execution stops
> at the exception.
> 
> $ ./a; echo $?
> 0
> 
> When executed under gdb, the exception is caught, and the process exits
> non-zero when continued:
> 
> (gdb) r
> Starting program: /home/corngood/a
> [New Thread 4300.0x1390]
> [New Thread 4300.0x1d24]
> [New Thread 4300.0x1d48]
> [New Thread 4300.0x80c]
> gdb: unknown target exception 0x20474343 at 0x7ff8d2cfa799
> Thread 1 "a" received signal ?, Unknown signal.
> 0x00007ff8d2cfa799 in RaiseException () from /cygdrive/c/WINDOWS/System32/KERNELBASE.dll
> (gdb) c
> Continuing.
> [Thread 4300.0x1d24 exited with code 541541187]
> [Thread 4300.0x1870 exited with code 541541187]
> [Thread 4300.0x1d48 exited with code 541541187]
> [Thread 4300.0x1390 exited with code 541541187]
> [Inferior 1 (process 4300) exited with code 04021641503]
> (gdb)
> 
> When executed under strace, it exits with an error as expected:
> 
> $ strace -o /dev/null a; echo $?
> 67
> 
> That's as far as I've investigated so far.

Is this the same issue with
https://cygwin.com/pipermail/cygwin/2019-October/242795.html ?

As far as I tested, this does not occur in 32-bit cygwin.

-- 
Takashi Yano <takashi DOT yano AT nifty DOT ne DOT jp>
--
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