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:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=GoJ+ybdDxycaQnG0 fIaj1MOe5/TRwcdYkADA28P2yr+NH9GtgBG/LKqIpfRqzPrjn0zfQTWN/iuWJv9v 9yjuq+Xw5kF2I9HTKMuQfRl7cROBwANEyeyi8aEE+/dOz4xKGqrLQ1HdGGvhm4kG VvH4gCPpmF5L+H5/d9E+ARoxrbY= 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:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; s=default; bh=GDhzkXltLGIBqGpMAO1RSc UCIWE=; b=d1Ux2UbgPInWZ2u+ogltKyQlbiAt7VwTOtOhrqHFh632brWGvnTl3w Aw7JTkJS2kA+1WvcSuTiPqwzTvtR8YePOw11oa0Ve7ydvfEjILOJ593rxR+NVyjP BlrNDAMx+DrlQWS5abFq6Qqqr9VKBt1pfS1zeWqX3kDjCJe/dUMcw= 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=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 Subject: Re: gcc-6.3.0-1 regression: libstdc++6 DLL breaks exception handling To: cygwin AT cygwin DOT com References: <6a80a46a-8de9-5d28-f7ef-897a53159603 AT t-online DOT de> From: Christian Franke Message-ID: Date: Tue, 7 Feb 2017 16:26:37 +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 In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes 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