delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/03/23/09:03:10

X-Spam-Check-By: sourceware.org
Message-ID: <20060323140259.33016.qmail@web53004.mail.yahoo.com>
Date: Thu, 23 Mar 2006 06:02:59 -0800 (PST)
From: Gary Zablackis <gzabl AT yahoo DOT com>
Subject: Re: dlopen() bug
To: skaller <skaller AT users DOT sourceforge DOT net>, Bernhard Loos <bernloos AT web DOT de>
Cc: cygwin AT cygwin DOT com
In-Reply-To: <1143006348.9731.127.camel@rosella.wigram>
MIME-Version: 1.0
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT 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

--- skaller <skaller AT users DOT sourceforge DOT net> wrote:

> On Wed, 2006-03-22 at 03:35 +0100, Bernhard Loos
> wrote:
> 
> > If the C++library declares its calls as 'extern
> "C"' (as it is done in the example),
> > AFAIK there shouldn't be any problem.
> 
> Doesn't matter what you think you know -- it's not a
> permitted thing
> to do, you never know what implementors are going to
> change.
>  

Who forbad it? A dll is just code which can be called
from any language as long as the interface rules are
followed by compilers, linkers and coders.

Anyway, the problem illustrated by the test case
occurs when a dll linked with -lstdc++ is dynamically
linked (via dlopen()) by a program which has not
previously initialized the standard library io
functions. 
Running the testcase in gdb or with debugging print
statements added to cygwin1.dll shows this clearly.
Also, the problem persists if ct.c is changed to ct.cc
and g++ is used throughout in the build.

I have built debug versions of both cygwin1.dll and
libstdc++. I hope to have some time this weekend to
finally look into this problem more deeply.

Gary

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019