This is the mail archive of the
mailing list for the Cygwin project.
Re: problem with JAVA and global constructors in dll
- To: "Dr. Schroeder, Klaus" <schroeder at repas-aeg dot de>
- Subject: Re: problem with JAVA and global constructors in dll
- From: Mumit Khan <khan at NanoTech dot Wisc dot EDU>
- Date: Fri, 7 Jan 2000 11:44:05 -0600 (CST)
- cc: cygwin at sourceware dot cygnus dot com
On Fri, 7 Jan 2000, Dr. Schroeder, Klaus wrote:
> I'm running a Java-application using native IO-routines from my.dll,
> which I built using the rules outlined by Mumit Kahn in his
> java-jni-examples. The example runs just fine including the calling of
> the global constructor, but using my own functions crashes with a
> segmentation violation in ioctl.
> Using gdb and a cygwin1.dll-Version with symbols I found, that ioctl
> uses a global instance of class locker defined in debug.cc (locker __tn
> NO_COPY;). This instance apparently was not initalized, which caused
> the segmentation violation.
> My Question: Why are the global constructors of cygwin1.dll not called,
> when used in the above fashion? Is there a way to call them explicitly?
Global constructors are certainly called, but there are issues in Cygwin
itself that may cause this problem unless you're using the latest Cygwin
DLL (and using one of my patches that's not in the snapshot itself -- cgf
is evaluating it).
Linkname: (patch) enable signals in dynamically loaded Cygwin DLL
If you send me the code for JNI (hopefully a trimmed down case that shows
the bug), I'll take a look.
Want to unsubscribe from this list?
Send a message to email@example.com