| delorie.com/archives/browse.cgi | search |
| X-Recipient: | archive-cygwin AT delorie DOT com |
| X-Original-To: | cygwin AT cygwin DOT com |
| Delivered-To: | cygwin AT cygwin DOT com |
| DMARC-Filter: | OpenDMARC Filter v1.3.2 sourceware.org 9B1B23857C65 |
| Authentication-Results: | sourceware.org; dmarc=none (p=none dis=none) |
| header.from=optusnet.com.au | |
| Authentication-Results: | sourceware.org; |
| spf=none smtp.mailfrom=dunc AT dimstar DOT local DOT net | |
| Date: | Sun, 15 Nov 2020 15:46:13 +1100 |
| From: | Duncan Roe <duncan_roe AT optusnet DOT com DOT au> |
| To: | cygwin AT cygwin DOT com |
| Subject: | Re: Failed assertion dialog box |
| Message-ID: | <20201115044613.GE2905@dimstar.local.net> |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| References: | <CAH5rLZVNLkwntpF4U-27+KeF_eh30yc2bij_MqejWTxBbdQmdw AT mail DOT gmail DOT com> |
| <20201114034504 DOT GD2905 AT dimstar DOT local DOT net> | |
| <CAH5rLZV+T7u_u6TgivKA7y2RmBJiySVuUsxPVJQjLsEYoN91_A AT mail DOT gmail DOT com> | |
| MIME-Version: | 1.0 |
| In-Reply-To: | <CAH5rLZV+T7u_u6TgivKA7y2RmBJiySVuUsxPVJQjLsEYoN91_A@mail.gmail.com> |
| User-Agent: | Mutt/1.10.1 (2018-07-13) |
| X-Optus-CM-Score: | 0 |
| X-Optus-CM-Analysis: | v=2.3 cv=F8MpiZpN c=1 sm=1 tr=0 cx=a_idp_d |
| a=LANN2BGfcS3zZ0PSgbjVGw==:117 a=LANN2BGfcS3zZ0PSgbjVGw==:17 | |
| a=kj9zAlcOel0A:10 a=nNwsprhYR40A:10 a=RSmzAf-M6YYA:10 a=PO7r1zJSAAAA:8 | |
| a=pGLkceISAAAA:8 a=eZ3Y8ILQc_sS73CcJn0A:9 a=CjuIK1q_8ugA:10 | |
| X-Spam-Status: | No, score=-1.3 required=5.0 tests=BAYES_00, |
| HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, | |
| RCVD_IN_DNSWL_LOW, SPF_HELO_PASS, SPF_NONE, | |
| 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> | |
| Errors-To: | cygwin-bounces AT cygwin DOT com |
| Sender: | "Cygwin" <cygwin-bounces AT cygwin DOT com> |
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 AT optusnet DOT com DOT 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.)
>
> --
> William M. (Mike) Miller | Edison Design Group
> william DOT m DOT miller AT gmail DOT com
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.
Cheers ... Duncan.
--
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
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |