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:subject:to:message-id:date:mime-version :content-type:content-transfer-encoding; q=dns; s=default; b=pBe e++TeeYM6j8P42spF594HKpzNiPLXwy5JtePzZ3YKkeE13riLiShoXjW4FoIIbsW SYRynIzOpDp0tBuse5L4aHRbIQ3lwE5s1E3AabQAfTPqv3CSX0F4r/QqT5SIiB1s ukK78kTeHriI2vVBPqIPk259G/rEByHWIU0vvfRw= 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:subject:to:message-id:date:mime-version :content-type:content-transfer-encoding; s=default; bh=6k/DN6dfT 7Z2Fzri3PraQxJ9K4c=; b=tSQQs6DvvvCcGXulV6OgKVaQEKIP4p8d0sWPnPfoG OoBWKM/uTk0MJFCXBxnZfU1xPsXZTwqNVcUU/eWhvoBhPt2BC+Dl+qIpyjdfGRSJ 1F6JOKqlqUesZW3Vg61BWdHgRU9wNlf8X+rS+77vKZIfBJ913r3nqmRw/zBkM7Mo Uo= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , 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-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.6 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=H*MI:online, H*M:online, upgrading X-HELO: mailout09.t-online.de From: Christian Franke Subject: gcc-6.3.0-1 regression: libstdc++6 DLL breaks exception handling To: cygwin AT cygwin DOT com Message-ID: <6a80a46a-8de9-5d28-f7ef-897a53159603@t-online.de> Date: Thu, 26 Jan 2017 11:30:43 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0 SeaMonkey/2.47 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes After upgrading to gcc test version 6.3.0-1, C++ exception handling is broken if DLL version of new libstdc++6 is used. Testcase: $ uname -srvmo CYGWIN_NT-10.0-WOW 2.6.1(0.305/5/3) 2016-12-16 11:50 i686 Cygwin or: CYGWIN_NT-10.0 2.6.1(0.305/5/3) 2016-12-16 11:55 x86_64 Cygwin $ cygcheck -f /bin/g++ gcc-g++-6.3.0-1 $ cygcheck -f /bin/cygstdc++-6.dll libstdc++6-6.3.0-1 $ cat exc.cc int main() { try { throw 42; } catch (int i) { return i; } return 0; } $ g++ -o exc exc.cc $ ./exc Segmentation fault (core dumped) Workaround: Use statically linked version of new libstdc++6: $ g++ -static -o exc-static exc.cc $ ./exc-static $ echo $? 42 Or: Downgrade cygstdc++6.dll: $ cygcheck -f /bin/cygstdc++-6.dll libstdc++6-5.4.0-1 $ ./exc $ echo $? 42 This also affects existing packages compiled with older g++, for example: $ /usr/sbin/smartctl -V smartctl 6.5 2016-05-07 r4318 [x86_64-unknown-cygwin-win10] (cygwin-6.5-1) ... smartmontools build with: C++98, GCC 5.3.0 ... Segmentation fault (core dumped) Regards, Christian -- 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