X-Recipient: archive-cygwin@delorie.com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DF76639B4046
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
	s=default; t=1605822789;
	bh=bz0A4sYUKGi1EgkYSIqwlgY21mFfOYUIB/eVcmhNCQw=;
	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=Cp+sjo2Bz5t4PZYZFBFGZnjy//MgyURXwXwRT3FcYsDenzLPLoA0y6aPv4d9Orfks
	 cTeqqMxwElwk0BMYdEG/awiCdEgM5cAEyVgFJaLGs5GSOHvnDhQLtVk61f+bKYjbUS
	 6NXagaWL9UahX0OxZAO/iYcV0WE+FRedRg8nAvY0=
X-Original-To: cygwin@cygwin.com
Delivered-To: cygwin@cygwin.com
DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 770773857C68
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
 b=dQpaWTsWZl9HsUMHJPV4OkezrjnnrEp0ojHpHnRojP3rZRrqggjPRSQVkA+X1ACoN6dWVncC6ZI2Mdm2SJJc6+DDJXlH36uXfqWT44gxfnUc58aEV9jCYXcpX1CWqhb215oElrJDr0IhbkBOwuNPfz24a8WLX50SNiNbrGJ8plMk3+mGihRKWan3If3n9tqZ3nxWtjJnP+C+E7rliG4YmbihMC006C6k2VlmmR383mpsLBR1FG4CwFOgMY5rRjgSEww18aWaVLf1fCuiXgrTvN2wizwvDqzUG7idjugUSKsZO/7sM9sEQVJnKt4AlKcc56rzlhYYw9mVWdvuRQwNEw==
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=YigZRSCef5s/W4cCEpVQsj5Fbe+LawEQaEHXJezB44o=;
 b=iXdzP8xyQIkiL1YtMl9jjRxy08A/usnueCwvPJQPfUXyORarhIXtmT1y8+BPUf4yvUG6fLH8rddLF3WuJ5ZcVC0QnghriOavCy0taG7H6jGoAe/VXc9L6vi1u2eVqoHB3uKyFAcjmFsS6oqXNGt1Yy8eT/z33s+TYAESHfPehuj6m8Z+NDYoc7EFWTRA22JMR4nB1sjYG6CWxA5ji14cz3HiRFTFGMke/r7205ZModqcPguPIHRNo0tAl7R+r7XxQkYBCOnLlhZzEEelUCo/DplRfdmuH+zui8setBDGdHeJKwVkl6fWkm7S08f876JA40Sc/77IiNrGH4sor4JuKA==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none;
 dkim=none; arc=none
To: "cygwin@cygwin.com" <cygwin@cygwin.com>
Subject: Re: Failed assertion dialog box ATTN: Takashi Yano
Thread-Topic: Failed assertion dialog box ATTN: Takashi Yano
Thread-Index: AQHWvn9MaFEGdGARrUqp6YKkZoKbo6nPxxMAgAA10Uw=
Date: Thu, 19 Nov 2020 21:53:05 +0000
Message-ID: <DM5PR19MB0986A2F2AE821C0F16E578A293E00@DM5PR19MB0986.namprd19.prod.outlook.com>
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>
 <CAH5rLZV25Z1EcrputHDswkuFRSVi8XJ+oJx5RaR3rYvawqay9w@mail.gmail.com>
 <DM5PR19MB098611D7A5F52EE51A7918B693E40@DM5PR19MB0986.namprd19.prod.outlook.com>
 <DM5PR19MB0986B3BF7499FE71262677FB93E40@DM5PR19MB0986.namprd19.prod.outlook.com>
 <DM5PR19MB0986D551BC9C6DAD28463FC193E00@DM5PR19MB0986.namprd19.prod.outlook.com>,
 <6d8262e3-4206-a05b-5252-f77bef27b0db@towo.net>
In-Reply-To: <6d8262e3-4206-a05b-5252-f77bef27b0db@towo.net>
Accept-Language: fr-CA, en-US
Content-Language: fr-CA
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
x-incomingtopheadermarker: OriginalChecksum:6350626E4C5E5E1FC40B8C202C7FF018CB25E7F3F0236B03478545A21BE56688;
 UpperCasedChecksum:7057B421BF25462AC577BC6FE19894AD7F11A76168C2B6CAFFEB2E69A4AD4663;
 SizeAsReceived:7400; Count:44
x-ms-exchange-messagesentrepresentingtype: 1
x-tmn: [V3Tj5Gg/Sk+QwTQZI4K6jxd3DJgDxnHD]
x-ms-publictraffictype: Email
x-incomingheadercount: 44
x-eopattributedmessage: 0
x-ms-office365-filtering-correlation-id: 03bebdd8-e52c-43aa-c6d4-08d88cd57ec8
x-ms-traffictypediagnostic: MW2NAM10HT074:
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: QA6804yWfI7DEv0hjpfvnx2AiqB/lJNSQhgSsZ8AdzHwAcwSYY0aQ12QRWyyS9/2dYDtQapp8poYkxeRjX01M2E+aSyxBwG0zDH+Xk26KGsyLEcoba7sqOJngKiJmqKpu8iHV3ALJYZHGftL+F25MI/cujoBOT8nO9sgoeU234McCEhFiDEypusIPvPaWJXYX8qSGi469fq7TZYECnuSiA==
x-ms-exchange-antispam-messagedata: K6qvlKA1WM6Yn3o7DFMtGYKpxgaeolTm6vNhoIV6PQfR5lo7OYS1smN0NXsHtVTp7wqybUkZf0wTB1ftjsEx/uhBXrnXn6wi0tQotm8BZedmE/NFPBxICCamYB5jEi+gXBkywOCV6/SemEEHBqoIlA==
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: MW2NAM10FT033.eop-nam10.prod.protection.outlook.com
X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000
X-MS-Exchange-CrossTenant-Network-Message-Id: 03bebdd8-e52c-43aa-c6d4-08d88cd57ec8
X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Nov 2020 21:53:05.5515 (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: MW2NAM10HT074
X-Spam-Status: No, score=-1.0 required=5.0 tests=BAYES_00, DKIM_SIGNED,
 DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, KAM_ASCII_DIVIDERS,
 RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_PASS,
 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@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: =?utf-8?q?Andr=C3=A9_Bleau_via_Cygwin?= <cygwin@cygwin.com>
Reply-To: =?iso-8859-1?Q?Andr=E9_Bleau?= <andre_bleau@hotmail.com>
Content-Type: text/plain; charset="iso-8859-1"
Sender: "Cygwin" <cygwin-bounces@cygwin.com>
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id 0AJLrasm016844

De : Cygwin <cygwin-bounces@cygwin.com> de la part de Thomas Wolff <redacted>
Envoyé : 19 novembre 2020 13:30
À : cygwin@cygwin.com <cygwin@cygwin.com>
Objet : Re: Failed assertion dialog box ATTN: Takashi Yano 
 
---------------------------------------------------------------------------------------

Am 19.11.2020 um 15:21 schrieb André Bleau via Cygwin:
> ...
> Here's some more info:
>
> It seems the bug is related to pseudo-console support; that explains why it is Windows 10 specific.
>
> Experiment:
>
> CYGWIN=disable_pcon /usr/bin/mintty &
>
> In the newly created window:
>
> $ ./a.exe </dev/null >output.txt 2>&1
> Aborted (core dumped)
>
> No message box popup.
>
> $ cat output.txt
> assertion "false" failed: file "assert.cpp", line 3, function: int main()
>
> In the original mintty window, with empty CYGWIN env variable:
>
> $ ./a.exe </dev/null >output.txt 2>&1
> Aborted (core dumped)
>
> A message box pops
>
> AND:
>
> $ cat output.txt
>
>   output.txt  is empty
>
> So, 2 problems here.
>
> In a CMD Window:
>
> set path=%PATH%D:\Cygwin\bin;
> a.exe <NUL: >outcmd.txt 2>&1
>        1 [main] a 759 cygwin_exception::open_stackdumpfile: Dumping stack trace to a.exe.stackdump
>
> type outcmd.txt
> assertion "false" failed: file "assert.cpp", line 3, function: int main()
>        1 [main] a 759 cygwin_exception::open_stackdumpfile: Dumping stack trace to a.exe.stackdump
>
> The bug could be in cygwin or in mintty. Maybe this is something that Thomas Wolff (mintty author) or Takashi Yano  (pseudo-console support expert) would want to look at.
> ---------------------------------------------------------------------------------------
>
> OK, I opened an issue for mintty and it was quickly closed with that quote:
>
> "Quick generic answer: if it's caused by ConPTY support, it's not related to mintty; also mintty never shows any popups.
> Funny thing, though, but really: assert isn't handled by the terminal."
>
> So the issue can only be with pseudo-console support in cygwin.
It does not seem to happen in xterm which is weird.
It does however also happen in rxvt-unicode, xfce4-terminal, and vte.
The message text of the popup can be easily found in cygwin code.
Thomas
---------------------------------------------------------------------------------------

One more data point:

The following program:

$ cat stderr.c
#include <stdio.h>
int main() {
  fprintf(stdout, "To stdout\n");
  fprintf(stderr, "To stderr\n");
  return 0;
}

$ gcc stderr.c
$ ./a.exe </dev/null >output.txt 2>&1

Behaves normally, with either empty CYGWIN env variable or with 
$ CYGWIN=disable_pcon /usr/bin/mintty &

So the problem is narrowly confined to how Cygwin handles assert when pseudo-console is used and stdin, stdout, and stderr are redirected. Not in all cases where pseudo-console is used and stdin, stdout, and stderr are redirected. 

- 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

