From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 110782 invoked by alias); 7 Feb 2017 15:27:01 -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 110682 invoked by uid 89); 7 Feb 2017 15:26:57 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=1.7 required=5.0 tests=AWL,BAYES_50,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,RP_MATCHES_RCVD autolearn=no version=3.3.2 spammy=examined, upgrading, jony, JonY X-HELO: mailout04.t-online.de Received: from mailout04.t-online.de (HELO mailout04.t-online.de) (194.25.134.18) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 07 Feb 2017 15:26:47 +0000 Received: from fwd10.aul.t-online.de (fwd10.aul.t-online.de [172.20.26.152]) by mailout04.t-online.de (Postfix) with SMTP id 530A741A5126 for ; Tue, 7 Feb 2017 16:26:45 +0100 (CET) Received: from [127.0.0.1] (G5wRd4ZGghbjzkGp-Mzjae6HdHiUm7dJBXhSeEwVQmyn+eke0rbqMKCjI+bSWDGQdN@[212.117.81.238]) by fwd10.t-online.de with (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384 encrypted) esmtp id 1cb7fC-1AqaIq0; Tue, 7 Feb 2017 16:26:38 +0100 Subject: Re: gcc-6.3.0-1 regression: libstdc++6 DLL breaks exception handling To: cygwin@cygwin.com References: <6a80a46a-8de9-5d28-f7ef-897a53159603@t-online.de> From: Christian Franke Message-ID: Date: Tue, 07 Feb 2017 15:27: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 In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2017-02/txt/msg00093.txt.bz2 JonY wrote: > On 01/26/2017 10:30 AM, Christian Franke wrote: >> After upgrading to gcc test version 6.3.0-1, C++ exception handling is >> broken if DLL version of new libstdc++6 is used. >> > Noted, I'll consider the test version broken for now. > > Meantime I examined the testcase with gdb: The DLL exports a bogus address for the symbol "_ZTIi" ('typeinfo for int'). This results in this more simple testcase: #include int main() { const std::type_info & ti = typeid(int); // &_ZTIi from DLL const char * p = ti.name(); // segfaults because &_ZTIi is bogus. } And indeed, the export table of the DLL looks 'interesting'. The offsets of various exported symbols are apparently all 93980000: $ objdump -p cygstdc++-6.dll [5142] +base[5143] c6760 Export RVA [5143] +base[5144] c6768 Export RVA [5144] +base[5145] 93980000 Export RVA ... [5151] +base[5152] 93980000 Export RVA [5152] +base[5153] 93980000 Export RVA [5153] +base[5154] 93980000 Export RVA [5154] +base[5155] 93980000 Export RVA ... [5167] +base[5168] 93980000 Export RVA [5168] +base[5169] c6780 Export RVA ... [Ordinal/Name Pointer] Table ... [5143] _ZTISt9type_info [5144] _ZTIa ... [5151] _ZTIh [5152] _ZTIi [5153] _ZTIj [5154] _ZTIl ... [5167] _ZTSDs [5168] _ZTSN10__cxxabiv115__forced_unwindE $ objdump -p cygstdc++-6.dll | grep -cw 93980000 759 Hmm... bug in the (bin)utils used to build the DLL? Possibly related: https://cygwin.com/ml/cygwin/2017-01/msg00375.html 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