hi all!
I experience strange crashes with programs I'm working on, and
I strongly suspect that this has something to do with the dynamic
code loading process.
I'm working on a modular image loader based on libgffd, which dlopens
drivers. When I test without linking with ggi it works ok. If I link with
ggi to load into a visual it segfault badly.
If I create the visual first, my code crashes when I call a dlsym'ed function,
and if I call my dl code first, it works well but ggi crashes on ggiOpen
GGI debug doesn't go beyond:
LibGII: Debugging=255
LibGGI: Debugging=255
LibGGI: ggiOpen("(null)") called
LibGGI: ggiOpen("x") called
Segmentation fault
Am I completely missing something about dlopen?
gdb trace:
Program received signal SIGSEGV, Segmentation fault.
0x4008426a in malloc () from /lib/libc.so.6
(gdb) bt
#0 0x4008426a in malloc () from /lib/libc.so.6
#1 0x40085935 in calloc () from /lib/libc.so.6
#2 0x40029b1c in _ggiNewVisual () from /usr/local/lib/libggi.so.2
#3 0x40025be1 in ggiOpen () from /usr/local/lib/libggi.so.2
#4 0x40025b19 in ggiOpen () from /usr/local/lib/libggi.so.2
#5 0x80491a4 in main ()
#6 0x40045577 in __libc_start_main () from /lib/libc.so.6