
23 Mar
2010
23 Mar
'10
4:24 p.m.
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) $