[Monetdb-developers] dlclose() segfault

Mark Bucciarelli mkbucc at gmail.com
Tue Mar 23 16:24:27 CET 2010


While learning about dlopen() and dynamic
libraries, I found that calling dlclose() on
libbat.so segfaults.

Is this a known behavior or a symptom of
some problem?

Thanks,

m

$ cat bad.c
#include <dlfcn.h>

int
main(void)
{
        void    *handle;
        char    *fn = "libbat.so";

        handle =  dlopen(fn, RTLD_NOW);
        dlclose(handle);

        return 0;
}
$ gcc bad.c && ./a.out
Segmentation fault (core dumped)
$




More information about the developers-list mailing list