This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: dynamically loading libgcj (still) SEGFAULTS
- To: Bryce McKinlay <bryce at waitaki dot otago dot ac dot nz>
- Subject: Re: dynamically loading libgcj (still) SEGFAULTS
- From: Jeff Sturm <jsturm at one-point dot com>
- Date: Mon, 24 Sep 2001 06:56:46 -0400 (EDT)
- cc: Johannes Zellner <johannes at zellner dot org>, java gcc <java at gcc dot gnu dot org>
On Mon, 24 Sep 2001, Bryce McKinlay wrote:
> >FWIW your test program works fine on my RH 6.2 box.
> >
> Interesting. It does still crash for me on RH 7.1. The problem here
> seems to be that the GC crashes when it is invoked from a libgcj that is
> in the process of being dlopen()ed. It is called from
> _Jv_RegisterClasses and most of the other static initializers.
>
> This issue came up a while back - see
> http://gcc.gnu.org/ml/java/2001-01/msg00590.html
Ah, I remember that. Thanks for the link.
I didn't mention that I first tried the test program on Alpha. That
now seems important, since i686-linux gets the static roots wrong. Here's
another try on a i686-pc-linux-gnu box:
(gdb) r
Starting program: /home/jsturm/fred
Program received signal SIGSEGV, Segmentation fault.
GC_mark_from (mark_stack_top=0x805a000, mark_stack=0x805a000,
mark_stack_limit=0x8062000) at ../../../boehm-gc/mark.c:655
warning: Source file is more recent than executable.
655 limit = (word *)((char *)limit - ALIGNMENT);
(gdb) call GC_dump()
***Static roots:
>From 0x0 to 0x40144240
Total size: 1075069504
Alpha doesn't have data_start or __data_start, and does the right thing.
In a test program I confirmed that a DSO fails to bind to data_start when
dlopen'ed, but works fine when explicitly linked. Weird.
Jeff