delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2014/07/07/15:34:08

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:to:from:subject:date:message-id:references
:mime-version:content-type:content-transfer-encoding
:in-reply-to; q=dns; s=default; b=M0iZE3QmXh5MT7v0PypA/4/DV6BjP2
Qw0JA9a7CoB7z4zKdtXvPI87e/rnnxdjIJhXd5pJm2lEw2rWoxRlGDLxd3/uXriT
Z6vZLWNc3f1JItQX+gUp04CPYniyzcQ1iobkY6jzcMpz8gk/fYuz0l7xKaYouzZo
mZuZx+J0qVyKE=
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:to:from:subject:date:message-id:references
:mime-version:content-type:content-transfer-encoding
:in-reply-to; s=default; bh=1vnqhjYm4qSh/1ePCoomq7B7zSg=; b=XUu5
Kscd6qXpHIOQjMd7uIaPy3Q7XpvFCVW6P7vvPMPa2yJR/YRXD/9uAVuRlLZRei9h
jr/LsGWFB/54YKlRVZV0UGPd2M8BuBcCbwkTDno1fIXMrAU2KS9u4NigDfwIPWkC
rMO/GDC4RJezpY5p/MvqAFG/JG3h41npyynOodg=
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-Virus-Found: No
X-Spam-SWARE-Status: No, score=-0.7 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,FSL_HELO_BARE_IP_2,RCVD_IN_DNSWL_NONE,RCVD_NUMERIC_HELO,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=no version=3.3.2
X-HELO: plane.gmane.org
To: cygwin AT cygwin DOT com
From: jojelino <jojelino AT gmail DOT com>
Subject: Re: abort during exit() with a dynamically loaded C++ library
Date: Tue, 08 Jul 2014 04:33:29 +0900
Lines: 24
Message-ID: <lpesm8$qev$1@ger.gmane.org>
References: <53A084E7 DOT 9010807 AT dronecode DOT org DOT uk> <53BAA770 DOT 7070005 AT dronecode DOT org DOT uk>
Mime-Version: 1.0
In-Reply-To: <53BAA770.7070005@dronecode.org.uk>
X-IsSubscribed: yes

On 2014-07-07 PM 10:58, Jon TURNEY wrote:
> On 17/06/2014 19:11, Jon TURNEY wrote:
>> I think I have found a problem when building programs using the latest
>> mesa library, where abort is being called during exit()

The main concern of this crash is the order mismatch between loading and 
unloading dynamic library. It seems that either crtbegin or crtend code 
of i386 libgcc has some pitfall. The mismatch always occurs when main() 
didn't statically link to libgcc.

If my memory serves me correctly, static version of deregister_frame_fn 
is set to wrong address (see cygming-crtbegin.c) by unknown fallacy of 
gnu-ld linker. That is, Object file seems okay, But generated dll breaks 
offset argument resulting in invalid offset operand of memory 
references, although Kai Tietz said in 
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57680 that It had been fixed.

Until the fallacy of gnu-ld is being resolved by someone that has plenty 
of time or someone have workaround against the fallacy of 
ever-not-warranted linker, I'll suggest you to just call 
dlopen("cyggcc_s-1") before dlopen'ing any DLL that has dynamic linkage 
to libgcc. It would be okay for workarounding the problem.
-- 
Regards.


--
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