This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


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

dynamically loading libgcj (still) SEGFAULTS


Hi,

the attached (simple) program SEGFAULTS with the latest
gcc / libgcj as from CVS.


(gdb) run
Starting program: /home/joze/fred
dlopen: loaded "libgcjgc.so"
dlopen: loaded "libz.so"
(no debugging symbols found)...(no debugging symbols found)...(no
debugging symbols found)...(no debugging symbols found)...
Program received signal SIGSEGV, Segmentation fault.
0x40158182 in GC_mark_from () from /home/joze/local/lib/libgcjgc.so
(gdb) where
#0  0x40158182 in GC_mark_from () from /home/joze/local/lib/libgcjgc.so
#1  0x40157f5f in GC_mark_some () from /home/joze/local/lib/libgcjgc.so
#2  0x4014f7df in GC_stopped_mark () from
/home/joze/local/lib/libgcjgc.so
#3  0x4014f4f3 in GC_try_to_collect_inner () from
/home/joze/local/lib/libgcjgc.so
#4  0x4015c67f in GC_init_inner () from /home/joze/local/lib/libgcjgc.so
#5  0x4015cee4 in GC_init () from /home/joze/local/lib/libgcjgc.so
#6  0x40155a89 in GC_init_gcj_malloc () from
/home/joze/local/lib/libgcjgc.so
#7  0x4046e25c in _Jv_InitGC() () from /home/joze/local/lib/libgcj.so
#8  0x403247d8 in _Jv_RegisterClasses () from
/home/joze/local/lib/libgcj.so
#9  0x402fc959 in frame_dummy () from /home/joze/local/lib/libgcj.so
#10 0x402f37c9 in _init () from /home/joze/local/lib/libgcj.so
#11 0x4000ac97 in call_init () from /lib/ld-linux.so.2
#12 0x4000aded in _dl_init () from /lib/ld-linux.so.2
#13 0x4011fa0c in getutmpx () from /lib/libc.so.6
#14 0x4000aaa0 in _dl_catch_error () from /lib/ld-linux.so.2
#15 0x4011fafd in _dl_open () from /lib/libc.so.6
#16 0x40023444 in seen_objects () from /lib/libdl.so.2
#17 0x4000aaa0 in _dl_catch_error () from /lib/ld-linux.so.2
#18 0x4002384f in dlerror () from /lib/libdl.so.2
#19 0x4002347f in dlopen () from /lib/libdl.so.2
#20 0x080485d5 in DlOpen ()
#21 0x0804864e in main ()
#22 0x4004364f in __libc_start_main () from /lib/libc.so.6
(gdb)


btw.:

export LD_PRELOAD="libgcj.so libgcjgc.so libz.so"

and ordinary system programs like 'rm' are segfaulting.

really weird.

-- 
   Johannes
#define _REENTRANT
#include <dlfcn.h>
#include <stdio.h>

void
DlOpen(const char* name)
{

    if (!dlopen(name, RTLD_LAZY | RTLD_GLOBAL))
	fprintf(stderr, "dlopen: %s\n", dlerror());
    else
	fprintf(stderr, "dlopen: loaded \"%s\"\n", name);
}

int
main(int argc, char *argv[])
{
    DlOpen("libgcjgc.so");
    DlOpen("libz.so");
    DlOpen("libgcj.so");

    return 0;
}


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