This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: dlopen() bug

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


Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

Unsubscribe info:
Problem reports:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]