From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7752 invoked by alias); 19 Dec 2019 08:36:15 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 7744 invoked by uid 89); 19 Dec 2019 08:36:15 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-0.7 required=5.0 tests=AWL,BAYES_00,KAM_NUMSUBJECT,SPF_HELO_PASS,SPF_PASS autolearn=no version=3.3.1 spammy=yyy, dying, H*UA:Outlook, H*x:Outlook X-HELO: mailout1.w1.samsung.com Received: from mailout1.w1.samsung.com (HELO mailout1.w1.samsung.com) (210.118.77.11) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 19 Dec 2019 08:36:12 +0000 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20191219083609euoutp013f064981815d10c980ffd7d0ada88b8a~huNTs5k-A0981809818euoutp01P for ; Thu, 19 Dec 2019 08:36:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20191219083609euoutp013f064981815d10c980ffd7d0ada88b8a~huNTs5k-A0981809818euoutp01P DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1576744569; bh=cKS7pVQ4V0Q5OEFMXAoNzoBFSPAy6LF2vzKELRkDjDA=; h=From:To:In-Reply-To:Subject:Date:References:From; b=WjBCEEJKZo1uFJwJkVfDgjl1sbKZmFwsnkRThm4U0b8dIZxwdRcDVLcxnR/aZIDRc 2zAXu4+UC5K5qfLe+WatOR9by1cKAsV+qN/6672A6ARuXTa91wMgQmVgrymtzZU6il av+sqindkLC3WjziXJ2mIvK83pWbON+T2zFl2BpY= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20191219083609eucas1p295a7de7e1058161a9619b496c034ae30~huNTjFNXV0462204622eucas1p28; Thu, 19 Dec 2019 08:36:09 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id 54.88.61286.8763BFD5; Thu, 19 Dec 2019 08:36:09 +0000 (GMT) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20191219083608eucas1p11c90fb05a0ffde6f7d18f7112b568e8f~huNTQ5m2_2827328273eucas1p1b; Thu, 19 Dec 2019 08:36:08 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20191219083608eusmtrp1d1602963519fe1d539d888919da6b96e~huNTQYLsq0525205252eusmtrp1M; Thu, 19 Dec 2019 08:36:08 +0000 (GMT) Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id F6.A9.07950.8763BFD5; Thu, 19 Dec 2019 08:36:08 +0000 (GMT) Received: from PFEDIN01 (unknown [106.109.131.169]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20191219083608eusmtip28ae78bbbc8f9e79e42773261cb0ae4af~huNS7jLys2218122181eusmtip21; Thu, 19 Dec 2019 08:36:08 +0000 (GMT) From: "Pavel Fedin" To: , In-Reply-To: <9f6fe40a-2dda-211f-57bc-d8b05413db4a@SystematicSw.ab.ca> Subject: RE: [BUG] try..catch does not work if compiled with clang 8.0 Date: Thu, 19 Dec 2019 10:30:00 -0000 Message-ID: <000001d5b647$5c586d90$150948b0$@samsung.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-CMS-MailID: 20191219083608eucas1p11c90fb05a0ffde6f7d18f7112b568e8f X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20191217093504eucas1p14cced4e1f9fcec50e44e9223d1761858 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20191217093504eucas1p14cced4e1f9fcec50e44e9223d1761858 References: <000701d5b4bd$42c086f0$c84194d0$@samsung.com> <016d01d5b5b5$47d6b8a0$d78429e0$@samsung.com> <9f6fe40a-2dda-211f-57bc-d8b05413db4a@SystematicSw.ab.ca> X-IsSubscribed: yes X-SW-Source: 2019-12/txt/msg00195.txt.bz2 Hello! > Confirmed with clang++ 8 Good! Meanwhile i've tried to investigate it myself a bit and here's some more i= nfo: 1. With clang 8 __cxa_throw() ends up in Windows RaiseException(); with cl= ang 5 it simply doesn't make it there. I guess there's some problem with in= terpreting unwind info. 2. strace actually reports "exception XXX at YYY" twice with clang 5, when= the code is working. clang 8 code reports this only once before dying. 3. The problem is triggered by a combination of template (from_file_impl) = and "if" condition inside. If you remove any of these features (e. g. throw= unconditionally or move the code from template into from_file()), the code= starts working. Perhaps even generic clang 8 bug. > but WJFFM with g++ 7.4.0 and reports exception (below). Yes, confirmed. I was tricked by the fact that clang does not append ".exe= " to the binary name automatically (isn't it a small bug too?). So that she= ll sequence: $ clang++-8 catch_test.cpp catch_test_2.cpp -g -o catch_test $ g++ catch_test.cpp catch_test_2.cpp -g -o catch_test (note that no .exe suffix is given to -o !!!) ...produces two files, one named "catch_test" and another named "catch_tes= t.exe". Attempt to execute "./catch_test" in the shell first tries to find = the exact name and succeeds, always running the broken binary made by clang. > > So, a Windows exception is reported, then the whole thing silently qui= ts. > > I have an impression that it has to do with the bug I previously report= ed > > (and someone here claimed he could reproduce it) >=20 > Please provide a link to the Cygwin ML message; is it this, confirmed by = Takashi > Yano: >=20 > https://cygwin.com/ml/cygwin/2019-10/msg00038.html Yes, that one. Kind regards, Pavel Fedin Senior Engineer Samsung Electronics Research center Russia -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple