X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4F513385483D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1605328667; bh=0YECzrErW4kA3JFaTD+uS3mw7MMUzRA9/QeJkDow9JI=; h=To:Subject:Date:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=U3qVn4/L6tlDS5UXoAMvE9gUAt2hwEUbdngdhpNmszyoSE8zf3q2H6TogzxdswUeR 26E2XdcK9qfun22r/3boo/fpdOcTkO1g1t4koKPHVoTcOgSn6/DYXeN1tOB+hKLrCI KkyNrQfOhZezw/sxtRvmXoe91kSuef94CuYnUmTU= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 932563857C5F ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nOjWzSFsa8bZCIQbI/qz9MrBRhcJzt80GjsUfLtSyDwh4fHNa40tg6MwHnWShYd/o6rOeMSWKkYN41slELlh3O9ErPYxfgbRflpxW0bs/Z61JnhHzhzNVpWmAXQJB/LaZvfOoLUlEFmvkO86pawXl+FyqtrICff/BBXkooW7mh0X1jnzV3fB4P+ZqX7DDA8yfCVeqq7GMI8Q70TlTt081hq7GtpLr8Jcl+3u7K++ehqVd7wM+POjhoxeWSOldJ+BnztWlxan0jJhogcLNK0qe7XyWs5CAJM3OBzuXjt3WOkKw+wzul9BV8Mw3srJEtvoG4MLs8vVwIUSrd2osK1TRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=dXx5wPTyLC2ubxy5dVAAXodMM1vdXNtekHkdqAqTN2k=; b=Yq5XGYTbJQZNYTOn7PWzaBgei+pfYSalahYuLnYjcAdZRXYi6KTMMwTLCu7n6w/i+7fU8Qy3Pkj1jQ2ckaTrzsytS3fnzUwi3I+GRxihKkmabshT6AjEuqQaQW1A2QUtL4prmMMirpo+7kMajeFa5GpASFwhN/8d4Ig82w4EDuIfOfOpTxT7c2DlErE37Ln2dD43cTuBP7dryC5NzA7AsUJ/9JgJGS630XDTf3s3cEj31JvUHg6kNhPsR0uT+lCIgVAN4yCxHp2L+FfqsPXNAUjCRxZ6KbCE7JnDNxnmOynbK8EMP8JU87pCt3BJNN5oMnzAeBl4+9MyiqGqoK2uYw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none To: The Cygwin Mailing List Subject: Re: Failed assertion dialog box Thread-Topic: Failed assertion dialog box Thread-Index: AQHWueJihakC8bj3wUaqWhiXasH4NanG/U4AgAAKGACAAAMHQw== Date: Sat, 14 Nov 2020 04:37:43 +0000 Message-ID: References: <20201114034504 DOT GD2905 AT dimstar DOT local DOT net>, In-Reply-To: Accept-Language: fr-CA, en-US Content-Language: fr-CA X-MS-Has-Attach: X-MS-TNEF-Correlator: x-incomingtopheadermarker: OriginalChecksum:E04E22357C44993CD3BD17DD05C3D7437DA256CFF104CE63C80160B38DF4A883; UpperCasedChecksum:77E8A7E90F435CB29EA0C5F87795098283AEC4AAC769CB61B0A8132727A62EB4; SizeAsReceived:6993; Count:44 x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [fEpSse30tewPc6hQ9O5tEbOPxSrivBPi] x-ms-publictraffictype: Email x-incomingheadercount: 44 x-eopattributedmessage: 0 x-ms-office365-filtering-correlation-id: 2e0d6bf4-379d-4eb0-85b3-08d888570755 x-ms-traffictypediagnostic: DM6NAM12HT089: x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: GeUPmCuiwiWcshf6sRwPa3m4LyMBF+rUGCM0XED3FQIgURFcETr9opb1pVMiObrqnPmpxYBF85YTAHKRHDJ8wzJhnWdkQleVPDbqC2qu18IIGJeFo28g0T+8Be94ylCvhwQqZDswJgin36w0hRtLcAFYMOek71HjG8TFsTo6J+xukqMjXXUXG4+08pCWK/++nQsQnzQQUXCgN0S4Vtcd0Q== x-ms-exchange-antispam-messagedata: mNymbtQ4YScKakNpVBjXzTxmeb6/H9dBhn1PRAjyXT3w/Hztg6/iwRNdPSvJE7nOfYuOZwzkag+YgAfpZAffw4CDBBme3tiPTTsgiSJj49//ama9Dn1mDdWHz+tmiIFUUSXh1yJgtDRjMLMdbkpoXQ== x-ms-exchange-transport-forked: True MIME-Version: 1.0 X-OriginatorOrg: hotmail.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-AuthSource: DM6NAM12FT044.eop-nam12.prod.protection.outlook.com X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: 2e0d6bf4-379d-4eb0-85b3-08d888570755 X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Nov 2020 04:37:43.8323 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6NAM12HT089 X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_00, BODY_8BITS, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, 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-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.29 List-Id: General Cygwin discussions and problem reports List-Archive: List-Post: List-Help: List-Subscribe: , From: =?utf-8?q?Andr=C3=A9_Bleau_via_Cygwin?= Reply-To: =?iso-8859-1?Q?Andr=E9_Bleau?= Content-Type: text/plain; charset="iso-8859-1" Sender: "Cygwin" Note-from-DJ: This may be spam Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id 0AE4cFmJ025120 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 > >     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 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 -- 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