This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: GCJ application runs not too bad with shared libs, but crasheswithstatic libs - seems to be in _Jv_MonitorEnter
- From: Jeff Sturm <jsturm at one-point dot com>
- To: Scott Gilbertson <scottg at mantatest dot com>
- Cc: java at gcc dot gnu dot org
- Date: Fri, 22 Nov 2002 15:18:22 -0500 (EST)
- Subject: Re: GCJ application runs not too bad with shared libs, but crasheswithstatic libs - seems to be in _Jv_MonitorEnter
On Fri, 22 Nov 2002, Scott Gilbertson wrote:
> I commented out the sysconf call in is_mp (so is_mp always returns false),
> and the thing seems pretty solid now (i.e., I've hammered at it for about
> 10-15 minutes without a crash). I also made a little C program that prints
> the results of the same sysconf call, to see if there's something screwy
> with my setup, but the little program runs just fine.
It's possible the sysconf call is buggy with threads. I'd guess your
little C program isn't multithreaded.
Since sysconf reads /proc, it'll be sensitive to kernel version too.
Interestingly, GC_get_nprocs avoids it:
#ifdef GC_LINUX_THREADS
/* Return the number of processors, or i<= 0 if it can't be determined. */
int GC_get_nprocs()
{
/* Should be "return sysconf(_SC_NPROCESSORS_ONLN);" but that */
/* appears to be buggy in many cases. */
/* We look for lines "cpu<n>" in /proc/stat. */
...
Jeff