delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2019/12/19/03:37:14

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:from:to:in-reply-to:subject:date:message-id
:mime-version:content-transfer-encoding:content-type:references;
q=dns; s=default; b=sIFvHcL5EIPURRoLQs+8v1w/46wyqd5vmGa3NzYK4S9
Nui25qY/AsHu3TskbUS9nk6ao7gD17g8qpr6zRX0zZiTmy3wzundPRL41vvj7vtv
4jLZ2qVFWYYlB2uH/XteBqEL5GGZ5OSzVs3AznGGXDaDG7Vm7puR0fqEZCDiJF+k
=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:from:to:in-reply-to:subject:date:message-id
:mime-version:content-transfer-encoding:content-type:references;
s=default; bh=y7fmnvw7poZwT3B4lCy2lPEscqo=; b=BBMtVbibRicrbTovi
TiD1qaPbYSSEia1dUIy1gwk+sN0DiNC1Q9lT6TnNuPq8t5zYN1fS9oJzSCdolHz1
3QMhHXoueqXK5vrKtKov9YdYxfhObS/TZhy2ZWXM1cZH+WkteQvrzL5zH0DbXdKP
gGWYFDHmrFoTwvhfySy4TwZAh8=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
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
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=
From: "Pavel Fedin" <p DOT fedin AT samsung DOT com>
To: <Brian DOT Inglis AT SystematicSw DOT ab DOT ca>, <cygwin AT cygwin DOT com>
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 11:36:07 +0300
Message-ID: <000001d5b647$5c586d90$150948b0$@samsung.com>
MIME-Version: 1.0
X-CMS-MailID: 20191219083608eucas1p11c90fb05a0ffde6f7d18f7112b568e8f
X-Msg-Generator: CA
X-RootMTR: 20191217093504eucas1p14cced4e1f9fcec50e44e9223d1761858
X-EPHeader: CA
CMS-TYPE: 201P
X-CMS-RootMailID: 20191217093504eucas1p14cced4e1f9fcec50e44e9223d1761858
References: <CGME20191217093504eucas1p14cced4e1f9fcec50e44e9223d1761858 AT eucas1p1 DOT samsung DOT com> <000701d5b4bd$42c086f0$c84194d0$@samsung.com> <af3cb99f-f1cc-3bcc-9644-310c259eb222 AT SystematicSw DOT ab DOT ca> <a9a62b50-688c-5747-266a-e7bb8157adbb AT gmail DOT com> <b46cefcb-144b-50f8-1f79-d2879b4e4c25 AT SystematicSw DOT ab DOT ca> <016d01d5b5b5$47d6b8a0$d78429e0$@samsung.com> <9f6fe40a-2dda-211f-57bc-d8b05413db4a AT SystematicSw DOT ab DOT ca>
X-IsSubscribed: yes
Note-from-DJ: This may be spam
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id xBJ8anfc026194

 Hello!

> Confirmed with clang++ 8

 Good!
 Meanwhile i've tried to investigate it myself a bit and here's some more info:
 1. With clang 8 __cxa_throw() ends up in Windows RaiseException(); with clang 5 it simply doesn't make it there. I guess there's some problem with interpreting 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 shell 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_test.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 quits.
> > I have an impression that it has to do with the bug I previously reported
> > (and someone here claimed he could reproduce it)
> 
> Please provide a link to the Cygwin ML message; is it this, confirmed by Takashi
> Yano:
> 
> 	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


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019