X-Recipient: archive-cygwin@delorie.com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3ADD6388A41D
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
	s=default; t=1605445960;
	bh=MQ1aIGthXWn4Y9CPLye0ThE1hgzJg7E5tSEKatMAU+M=;
	h=References:In-Reply-To:Date:Subject:To:List-Id:List-Unsubscribe:
	 List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:
	 From;
	b=pxm8ORuuDKLDoED80HgXaQBkuIG2D6j8LVuGOzaPp+oz95UwmDFdDcICg94+S4SfE
	 VvMEJG/laCw7KmyCyhewI884hDCLX2Mm11P9TN7xHGSSulHJMTmU6oRGznAJ7cWK77
	 SVNSO5PAnSddMf/KvtZwzJHG4JoXIJ2MdFGxgIwM=
X-Original-To: cygwin@cygwin.com
Delivered-To: cygwin@cygwin.com
DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 9E0BF3851C13
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to;
 bh=23Ul7+Xf3IQHGDzGt4jbvifv/gykCWDlBFB1noL5zYA=;
 b=iHMqdoKvroJaH442+uxHiBtk6s0fmuMErwbwyNvPCjcmPGe55fsuXc0qXfdH4IMr3u
 mO6kCnUamn3Q4Zj2iJDtzk2hbzdONWLnPsABpB+CTAMZPLFF7B498ZLpPzV04Skr+ks3
 SDTBljU3QhFBjEB7qhlYCe2r932gEkjiz5V8USrbYP+cjNXa4Rsu1W1vb+a5uA8/yKo/
 awOvhDIKlZ2f2r4YFuF0Ey7ZBts/4QLZgu+qA+aaZnxkgy/zryiWssvwmbwIvjq4pnKw
 RC67CjDQq5r05KjEib+HZgkOiFrDESE2M57K497YzAkTp76S7m8xV6JB2QOEmfszr+3F
 jhgg==
X-Gm-Message-State: AOAM530LTJPRkFMG58vISa/Zyar2MSbSVwkEZjx1L6brGr9YKl6ZRdon
 rMgYSCo6/ihHm2D32nO7SNU/k/KVHG9I4Jrtx5VOx+1wN9Y=
X-Google-Smtp-Source: ABdhPJxr4LQWIgr/OD79UXFN6GGM3/oePvm6lVIx7RWx+nPd+xSulH11u83AwY0HxpHnmPWxJA38E2JksmaPISwOb7M=
X-Received: by 2002:a17:906:f207:: with SMTP id
 gt7mr10585066ejb.293.1605445955328; 
 Sun, 15 Nov 2020 05:12:35 -0800 (PST)
MIME-Version: 1.0
References: <CAH5rLZVNLkwntpF4U-27+KeF_eh30yc2bij_MqejWTxBbdQmdw@mail.gmail.com>
 <20201114034504.GD2905@dimstar.local.net>
 <CAH5rLZV+T7u_u6TgivKA7y2RmBJiySVuUsxPVJQjLsEYoN91_A@mail.gmail.com>
 <20201115044613.GE2905@dimstar.local.net>
In-Reply-To: <20201115044613.GE2905@dimstar.local.net>
Date: Sun, 15 Nov 2020 08:12:23 -0500
Message-ID: <CAH5rLZV25Z1EcrputHDswkuFRSVi8XJ+oJx5RaR3rYvawqay9w@mail.gmail.com>
Subject: Re: Failed assertion dialog box
To: The Cygwin Mailing List <cygwin@cygwin.com>
X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00, DKIM_SIGNED,
 DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, HTML_MESSAGE,
 RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS,
 TXREP autolearn=ham autolearn_force=no version=3.4.2
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on
 server2.sourceware.org
X-Content-Filtered-By: Mailman/MimeDel 2.1.29
X-BeenThere: cygwin@cygwin.com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-request@cygwin.com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=subscribe>
From: "William M. \(Mike\) Miller via Cygwin" <cygwin@cygwin.com>
Reply-To: "William M. \(Mike\) Miller" <william.m.miller@gmail.com>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: "Cygwin" <cygwin-bounces@cygwin.com>

On Sat, Nov 14, 2020 at 11:49 PM Duncan Roe <duncan_roe@optusnet.com.au>
wrote:

> On Fri, Nov 13, 2020 at 11:21:12PM -0500, cygwin wrote:
> > On Fri, Nov 13, 2020 at 10:45 PM Duncan Roe <duncan_roe@optusnet.com.au>
> > wrote:
> >
> > > Hi William,
> > >
> > > On Fri, Nov 13, 2020 at 12:27:57PM -0500, cygwin wrote:
> > > > I've run into a problem running a collection of tests under Cygwin
> and I
> > > > wonder if anyone can suggest a way around it.
> > > >
> > > > The problem occurs when a program being run fails a C/C++ runtime
> > > > assertion. Ordinarily, this just writes an error message on stderr
> and
> > > > aborts. Under Cygwin, however, if both stdin and stderr are
> redirected to
> > > > files, the program instead pops up a dialog box that must be
> > > interactively
> > > > dismissed before the failed program will exit - holding up all the
> tests
> > > > that follow it.
> > > >
> > > > Specifically, if I have the following as assert.cpp:
> > > >
> > > >     #include <assert.h>
> > > >     int main() {
> > > >       assert(false);
> > > >     }
> > > >
> > > > and say
> > > >
> > > >     gcc assert.cpp
> > > >     ./a.exe < /dev/null > output 2>&1
> > > >
> > > > I get an error dialog box saying
> > > >
> > > >     Failed assertion
> > > >         false
> > > >     at line 3 of file assert.cpp
> > > >     in function int main()
> > > >
> > > > If I omit either the stdin or the stderr redirection, the program
> behaves
> > > > as desired with no dialog box.
> > > >
> > > > Is there an environment setting or compiler command-line option I can
> > > give
> > > > to suppress the dialog box and always just write a message to stderr
> and
> > > > abort? Thanks for any insights.
> > >
> > > Your example WFFM, (Cygwin64, gcc 10.2.0, everything else also up to
> date).
> > >
> > > Do you still see this behaviour if you run the installer?
> > >
> >
> > Thanks for your reply; unfortunately, yes, it does. I had refreshed
> > the installation fairly recently, and running the installer only updated
> a
> > few things, not cygwin.dll and not gcc; my installation is the same as
> > yours. I've tried it with three different shells (tcsh, bash, mksh) and
> > with both gcc and clang, and all have the same behavior. (Interestingly,
> if
> > I compile the example with MSVC and run it in a Cygwin shell, it does
> _not_
> > pop up an error dialog box, so presumably it's in the Cygwin runtime,
> > specifically the definition of __assert_func.)
>
> Sorry, should have mentioned running on Win7 Home.
>
> When I try it on my wife's Win10 system, I get the dialog box same as you.
>

That's disappointing. Thanks for the additional information, though.

-- 
William M. (Mike) Miller | Edison Design Group
william.m.miller@gmail.com
--
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
