delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1998/10/28/13:26:35

From: khan AT xraylith DOT wisc DOT edu (Mumit Khan)
Subject: Re: dll, java, gcc, cygwin
28 Oct 1998 13:26:35 -0800 :
Message-ID: <9810272150.AA27693.cygnus.gnu-win32@modi.xraylith.wisc.edu>
References: <19981027211637 DOT 3544 DOT rocketmail AT send104 DOT yahoomail DOT com>
To: earnie_boyd AT yahoo DOT com
Cc: Glen Fullmer-EGF002 <Glen_Fullmer-EGF002 AT email DOT mot DOT com>, mickish AT cmu DOT edu,
gnu-win32 AT cygnus DOT com

Earnie Boyd <earnie_boyd AT yahoo DOT com> writes:
> 
> Have you tried using the libmmalloc.a library that comes with the
> cygwin package for your malloc and friends routines?  Note: that there
> are two m's and is a Mapped Memory Allocation package.  This has
> seemed to fix various other porters problems when I've suggested it.

I tend to shudder everytime someone recommends a different malloc
package to fix bugs in code; more often than not, it just hides the
bug waiting to bite on another platform. There are pretty reliable
ways to debug memory allocation problems (eg., we use Purify on all
our supported platforms).

I don't remember if I already responded to Glenn's message or not 
(or if I copied the list or not), so here's quick recap to avoid 
further confusion and speculation.

  - cygwin app loading cygwin dll ................ OK
  - cygwin app loading "native" dll .............. OK if you do it right
  - "native" app loading cygwin dll .............. NOT OK (bug!)

Here I'm using "native" for msvc or mingw compiled apps. Since Java is
a "native" app, you just can't load cygwin JNI dll until this bug is
fixed. There is also an issue of threading with Java when loading a
cygwin JNI DLL, and I have yet to look in that direction.

I've tracked down the problem, but have no idea what the solution is.
Basically, the DLL startup is not initializing Cygwin properly (yes,
I did take all the necessary steps for cygwin), and pretty much 
everything that requires impure_ptr will crash, which includes all the
stdio, memory allocation, etc in newlib.

I've submitted a test case to cygwin32 developers and hopefully someone
will come forward and figure it out. It's a bit beyond my expertise ...

It's not a memory allocation problem per se, but a much larger one.

Regards,
Mumit

-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


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