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: Core dump on 32-bit Cygwin if program calls dlopen


On Jul 15 07:45, Ken Brown wrote:
> On 7/15/2014 5:02 AM, Corinna Vinschen wrote:
> >On Jul 14 19:42, Ken Brown wrote:
> >>I'm getting a core dump on exit from a program that does nothing but call
> >>dlopen.  (But the call to dlopen succeeds.)  This happens only in the 32-bit
> >>case.  Here's a simple test case.
> >>
> >>$ cat test_dlopen.c
> >>#include <stdio.h>
> >>#include <dlfcn.h>
> >>int
> >>main()
> >>{
> >>   const char *dllname = "cyggs-9.dll";
> >>   void *handle;
> >>   printf ("Trying to dlopen %s...", dllname);
> >>   handle = dlopen (dllname, RTLD_LAZY);
> >>   if (handle)
> >>     {
> >>       printf ("succeeded.\n");
> >>       return 0;
> >>     }
> >>   else
> >>     {
> >>       printf ("failed.\n");
> >>       return 1;
> >>     }
> >>}
> >>
> >>$ gcc test_dlopen.c
> >>
> >>$ ./a
> >>Trying to dlopen cyggs-9.dll...succeeded.
> >>Aborted (core dumped)
> >
> >The crash occurs when calling the destructors from do_global_dtors.
> >The crash address points to a crash inside a destructor of libgcc
> >(actually cyggcc_1-1.dll) which has been pulled in by cyggs-9.dll.
> >
> >What destructor in libgcc would that be?  And what is it expecting
> >which is apparently missing?
> 
> FWIW, the problem disappears if I revert gcc-core and libgcc1 to 4.8.2-2.

JonY, do you have a chance to have a look into this issue?


Thanks,
Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

Attachment: pgpqj0QP5yYwH.pgp
Description: PGP signature


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