Subject: Re: dlopen() bug
From: Gary Zablackis <[email-masked]>
To: skaller <[email-masked]>, Bernhard Loos <[email-masked]>
Cc: [email-masked]
Date: Thu, 23 Mar 2006 06:02:59 -0800 (PST)

--- skaller <[email-masked]> 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/