delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2020/11/14/09:13:08

X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3083D3851C27
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1605363146;
bh=7jMpuMxCWRyiVDddT0ivrmBqqDUrD/8RgLZK/ES/cds=;
h=References:In-Reply-To:Date:Subject:To:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:
From;
b=s2WRujSJJx+jenEpaZfzhNSI5OLwo+Gy0boaH/dasOCAF2y8PIFpv07dNbB3YYjj3
kMcmi+/1h+NiOqD6eOcP2RW9cut4ZNNcbeaqZNebVgMoa2IGcyb2VUErqCJosbeEdd
7aZ+9HzkysHv8qUQ5rHMFyusf/dWTQZ4rd05TjHU=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 188433857C78
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:cc;
bh=RRF6Xy/lhWP6tncGPpOKX7Xhjnzk9H7cK3RnWfp4VAY=;
b=AndUfSsRnPiygeVX7XztquKSl0nEzOfHca6rthCU4ouL1y4Ui9o6YX5Jhsm0lJko5v
e3JFPrJDGRd5UWyFaUATVwkiXJIwwkppKtIY3hyTC61uGeqs6wEKg8xKYlEaygk4JFCp
qRyOvZjU05wzabPR3ivs5LsGJrIq34s1QGVfGdfR0H2DApLPCiksouETdt0dnvDxN7E9
77Tdxo2GqrAhtSSjaWKSsJTcTATZ+C8yUdcXU9IEPmcHhHnJGX58Achay7bm6fcFBtJI
gJbCeyjDj0dG34rgq47MHiit8IwEOVW/ISf3Ia0up1fYJgpvZifV5aQtjqMf1puT/++t
zcbw==
X-Gm-Message-State: AOAM531z5Fn1ucbDDj042ZBs4ifJ7sMUX2X2veHmt85wOrvxfqE9TAP2
w0e71OPcdpep2pw6oh5feZ3C2FEkxywjTt26Y6Q=
X-Google-Smtp-Source: ABdhPJwroA90sqo6RvfFEWQ2ps2bgCN3gbrUIrA8+ldlFhtc/W4PQlz/Fko5IILkNlrK+3hMXMcgzjTBPsj0owNIwQQ=
X-Received: by 2002:a17:906:f207:: with SMTP id
gt7mr6860890ejb.293.1605363142154;
Sat, 14 Nov 2020 06:12:22 -0800 (PST)
MIME-Version: 1.0
References: <CAH5rLZV+T7u_u6TgivKA7y2RmBJiySVuUsxPVJQjLsEYoN91_A AT mail DOT gmail DOT com>
<MWHPR19MB09925AD67FFA893D1B8805E293E50 AT MWHPR19MB0992 DOT namprd19 DOT prod DOT outlook DOT com>
<20201114143744 DOT 92E5 DOT 50F79699 AT gmail DOT com>
In-Reply-To: <20201114143744.92E5.50F79699@gmail.com>
Date: Sat, 14 Nov 2020 09:12:11 -0500
Message-ID: <CAH5rLZVXdua=dFs7jB=LpG_ObHCwRqCnoMSbRiTnJvUk3tP0uA@mail.gmail.com>
Subject: Re: Failed assertion dialog box
To: Lemures Lemniscati <lemures DOT lemniscati AT gmail DOT com>
X-Spam-Status: No, score=-2.4 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 AT cygwin DOT 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 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: "William M. \(Mike\) Miller via Cygwin" <cygwin AT cygwin DOT com>
Reply-To: "William M. \(Mike\) Miller" <william DOT m DOT miller AT gmail DOT com>
Cc: The Cygwin Mailing List <cygwin AT cygwin DOT com>
Sender: "Cygwin" <cygwin-bounces AT cygwin DOT com>
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 0AEECr7N002315

On Sat, Nov 14, 2020 at 12:39 AM Lemures Lemniscati via Cygwin <
cygwin AT cygwin DOT com> wrote:

> On Sat, 14 Nov 2020 04:37:43 +0000, André Bleau via Cygwin
> >
> > On Fri, Nov 13, 2020 at 10:45 PM Duncan Roe
> > 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.)
> >
> > I see the same behavior as William:
> >
> > ./a.exe < /dev/null > output.txt 2>&1
> > pops a message box.
> >
> > gcc (GCC) 10.2.0
> > CYGWIN_NT-10.0 XXX 3.1.7(0.340/5/3) 2020-08-22 17:48 x86_64 Cygwin
> > mintty 3.4.1 (x86_64-pc-cygwin)
> >
> > - André Bleau
>
> It works fine for me.
> Can you check 'gcc -M assert.cpp' ?
> My result is:
>
> $ gcc -M assert.cpp
> assert.o: assert.cpp /usr/include/assert.h /usr/include/_ansi.h \
>  /usr/include/newlib.h /usr/include/_newlib_version.h \
>  /usr/include/sys/config.h /usr/include/machine/ieeefp.h \
>  /usr/include/sys/features.h /usr/include/cygwin/config.h
>

Mine is identical. (Same for "uname -a" output, which André posted above.)

The fact that you and André don't get a dialog box gives me hope that
there's something in the environment or installation that controls that
behavior. (Just to make certain, "works find for me" means that you ran the
executable, redirecting both stdin and stderror, and did not get an error
popup, right?)

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019