delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/05/10/10:50:00

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,T_TO_NO_BRKTS_FREEMAIL
X-Spam-Check-By: sourceware.org
Message-ID: <4BE82193.7070506@gmail.com>
Date: Mon, 10 May 2010 16:09:07 +0100
From: Dave Korn <dave DOT korn DOT cygwin AT googlemail DOT com>
User-Agent: Thunderbird 2.0.0.17 (Windows/20080914)
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: run_ctors
References: <16565 DOT 11649 DOT qm AT web25508 DOT mail DOT ukl DOT yahoo DOT com>
In-Reply-To: <16565.11649.qm@web25508.mail.ukl.yahoo.com>
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

On 10/05/2010 10:00, Marco Atzeri wrote:

> The program works fine, with minor source change, 
> except the capability to dynamically load dlls to
> extend the functionality.
> 
> From the backtrace I have the impression that the loaded
> library msh3.dll has a access problem to a constructor 
> "TheOperators" that is located in the calling libff.dll.

  Ugh, this looks like a tricky one.  I can't really guess at what the problem
is from that backtrace, you'd need to look at what pointer is NULL and then
try figure out where it came from; which could be something to do with order
of running of ctors or something like that.

> Program received signal SIGSEGV, Segmentation fault.
> 0x66c83a12 in Polymorphic::Addp () from /usr/local/bin/libff.dll
> (gdb) backtrace
> #0  0x66c83a12 in Polymorphic::Addp () from /usr/local/bin/libff.dll
> #1  0x624dbca1 in _fu952__TheOperators () from /usr/local/lib/ff++/3.8/lib/msh3.dll
> #2  0x624dcf1c in global constructors keyed to msh3.cpp ()
>    from /usr/local/lib/ff++/3.8/lib/msh3.dll
> #3  0x61020273 in per_module::run_ctors () from /usr/bin/cygwin1.dll
> #4  0x00000000 in ?? ()

> Unfortunately my debug capability with gdb are very limited
> so I don't understand if the software has an issue or
> if the problem could be located in the cygwin1.dll.

  Well, I doubt that the process has forked here, so you probably won't be
getting the double-pseudo-relocs problem we just found, but you should
probably test with the latest cygwin snapshot just to be sure.  Assuming,
however, that that will probably not help, your best bet might be to step
through "global constructors keyed to msh3.cpp" and see what it's calling;
figure out what object it thinks it's constructing when it gets to
"_fu952__TheOperators", and follow it into "Polymorphic::Addp" to see where it
goes wrong.

  I'm quite busy at the moment but send me your patches/cygport/whatever
off-list anyway.

    cheers,
      DaveK


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