Re: problems with dlopen

2001-12-07 Thread Christopher Faylor
On Fri, Dec 07, 2001 at 05:56:43PM +0100, Henning Moll wrote: >Again, any suggestions? Look at the cygwin source code? cgf -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ

Re[2]: problems with dlopen

2001-12-07 Thread Henning Moll
Hallo Cliff, Friday, December 07, 2001, 5:26:33 PM, you wrote: > If your suspicion is correct, then simply moving "state = 1" to before > the call of dlopen should do the trick, i.e.: > case 0: > state = 1; > handle = dlopen("cygwi

Re: problems with dlopen

2001-12-07 Thread Cliff Hones
> Why does this code fail with segfault? > I think the problem is that dlopen calls malloc itself? Is that right? > Any suggestions how to fix it? If your suspicion is correct, then simply moving "state = 1" to before the call of dlopen should do the trick, i.e.: case 0:

problems with dlopen

2001-12-07 Thread Henning Moll
Hello! Why does this code fail with segfault? I think the problem is that dlopen calls malloc itself? Is that right? Any suggestions how to fix it? --snip-- #include #include static void *(*orig_malloc) (size_t) = 0; void * malloc(size_t p) { static int state = 0; void * hand