From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12olkn2050.outbound.protection.outlook.com [40.92.21.50]) by sourceware.org (Postfix) with ESMTPS id 932563857C5F for ; Sat, 14 Nov 2020 04:37:44 +0000 (GMT) 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 Received: from DM6NAM12FT044.eop-nam12.prod.protection.outlook.com (2a01:111:e400:fc64::40) by DM6NAM12HT089.eop-nam12.prod.protection.outlook.com (2a01:111:e400:fc64::405) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3589.12; Sat, 14 Nov 2020 04:37:44 +0000 Received: from MWHPR19MB0992.namprd19.prod.outlook.com (2a01:111:e400:fc64::40) by DM6NAM12FT044.mail.protection.outlook.com (2a01:111:e400:fc64::204) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3589.11 via Frontend Transport; Sat, 14 Nov 2020 04:37:43 +0000 Received: from MWHPR19MB0992.namprd19.prod.outlook.com ([fe80::3511:a59f:c8a7:8a1f]) by MWHPR19MB0992.namprd19.prod.outlook.com ([fe80::3511:a59f:c8a7:8a1f%11]) with mapi id 15.20.3541.025; Sat, 14 Nov 2020 04:37:43 +0000 From: =?iso-8859-1?Q?Andr=E9_Bleau?= 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.GD2905@dimstar.local.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 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable 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@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Nov 2020 04:37:46 -0000 =0A= On Fri, Nov 13, 2020 at 10:45 PM Duncan Roe =0A= wrote:=0A= =0A= > Hi William,=0A= >=0A= > On Fri, Nov 13, 2020 at 12:27:57PM -0500, cygwin wrote:=0A= > > I've run into a problem running a collection of tests under Cygwin and = I=0A= > > wonder if anyone can suggest a way around it.=0A= > >=0A= > > The problem occurs when a program being run fails a C/C++ runtime=0A= > > assertion. Ordinarily, this just writes an error message on stderr and= =0A= > > aborts. Under Cygwin, however, if both stdin and stderr are redirected = to=0A= > > files, the program instead pops up a dialog box that must be=0A= > interactively=0A= > > dismissed before the failed program will exit - holding up all the test= s=0A= > > that follow it.=0A= > >=0A= > > Specifically, if I have the following as assert.cpp:=0A= > >=0A= > >=A0=A0=A0=A0 #include =0A= > >=A0=A0=A0=A0 int main() {=0A= > >=A0=A0=A0=A0=A0=A0 assert(false);=0A= > >=A0=A0=A0=A0 }=0A= > >=0A= > > and say=0A= > >=0A= > >=A0=A0=A0=A0 gcc assert.cpp=0A= > >=A0=A0=A0=A0 ./a.exe < /dev/null > output 2>&1=0A= > >=0A= > > I get an error dialog box saying=0A= > >=0A= > >=A0=A0=A0=A0 Failed assertion=0A= > >=A0=A0=A0=A0=A0=A0=A0=A0 false=0A= > >=A0=A0=A0=A0 at line 3 of file assert.cpp=0A= > >=A0=A0=A0=A0 in function int main()=0A= > >=0A= > > If I omit either the stdin or the stderr redirection, the program behav= es=0A= > > as desired with no dialog box.=0A= > >=0A= > > Is there an environment setting or compiler command-line option I can= =0A= > give=0A= > > to suppress the dialog box and always just write a message to stderr an= d=0A= > > abort? Thanks for any insights.=0A= >=0A= > Your example WFFM, (Cygwin64, gcc 10.2.0, everything else also up to date= ).=0A= >=0A= > Do you still see this behaviour if you run the installer?=0A= >=0A= =0A= Thanks for your reply; unfortunately, yes, it does. I had refreshed=0A= the installation fairly recently, and running the installer only updated a= =0A= few things, not cygwin.dll and not gcc; my installation is the same as=0A= yours. I've tried it with three different shells (tcsh, bash, mksh) and=0A= with both gcc and clang, and all have the same behavior. (Interestingly, if= =0A= I compile the example with MSVC and run it in a Cygwin shell, it does _not_= =0A= pop up an error dialog box, so presumably it's in the Cygwin runtime,=0A= specifically the definition of __assert_func.)=0A= =0A= -- =0A= William M. (Mike) Miller | Edison Design Group=0A= =0A= =0A= I see the same behavior as William:=0A= =0A= ./a.exe < /dev/null > output.txt 2>&1=0A= pops a message box.=0A= =0A= gcc (GCC) 10.2.0=0A= CYGWIN_NT-10.0 XXX 3.1.7(0.340/5/3) 2020-08-22 17:48 x86_64 Cygwin=0A= mintty 3.4.1 (x86_64-pc-cygwin)=0A= =0A= - Andr=E9 Bleau=