From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 121808 invoked by alias); 26 Jan 2017 10:31:02 -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 120643 invoked by uid 89); 26 Jan 2017 10:31:00 -0000 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 Received: from mailout09.t-online.de (HELO mailout09.t-online.de) (194.25.134.84) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 26 Jan 2017 10:30:50 +0000 Received: from fwd34.aul.t-online.de (fwd34.aul.t-online.de [172.20.26.145]) by mailout09.t-online.de (Postfix) with SMTP id 03C6C427CC9B for ; Thu, 26 Jan 2017 11:30:48 +0100 (CET) Received: from [127.0.0.1] (EwmppsZaZhyMCqqnsEhwxTYkNcq8g-IvTPfDI8kXwgYQ3P5Dlv+umQAuYVp-n1VgMY@[212.117.81.238]) by fwd34.t-online.de with (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384 encrypted) esmtp id 1cWhKF-0ojWS00; Thu, 26 Jan 2017 11:30:43 +0100 From: Christian Franke Subject: gcc-6.3.0-1 regression: libstdc++6 DLL breaks exception handling To: cygwin@cygwin.com Message-ID: <6a80a46a-8de9-5d28-f7ef-897a53159603@t-online.de> Date: Thu, 26 Jan 2017 10:31:00 -0000 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 X-SW-Source: 2017-01/txt/msg00315.txt.bz2 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