seg fault on startup

Ben Tatham bentatham@nanometrics.ca
Wed Mar 21 18:38:00 GMT 2007


David Daney wrote:
> Andrew Haley wrote:
>> Ben Tatham writes:
>>  > More fuel for the investigation.
>>  >  > I have now tried to build our application with 
>> GCC-4.2-20070307, with  > the much simpler -static-libgcj option...
>>  >  > %.o : %.jar
>>  >         $(gccdir)/bin/$(platform)-gcj $(includes) -c -g -O $<
>>  >  > apollo : $(objects)
>>  >         $(gccdir)/bin/$(platform)-gcj -g -O -static-libgcj -o  > 
>> apollo.debug --main=ca.nanometrics.apollo.taurus.MissionControlTaurus 
>>  > $(objects)
>>  >         $(gccdir)/bin/$(platform)-strip --strip-debug apollo.debug 
>> -o apollo
>>  >  > Unfortunately, it still seg faults right at startup.  This 
>> time, I get a  > backtrace though. 
>> Ah, excellent.
>>
>>  > Does this mean anything to anyone?  Why does it say that the
>>  > language is c++ now though?
>>
>> Because it is.
>>
>>  > Program terminated with signal 11, Segmentation fault.
>>  > #0  _Jv_RegisterClasses (classes=0x10f80074)
>>  >     at  > 
>> /disk1/xtool/crosstool-0.43/build/powerpc-860-linux-gnu/gcc-4.2-20070307-glibc-2.3.3/gcc-4.2-20070307/libjava/java/lang/natClassLoader.cc:189 
>>
>>  > 189     _Jv_RegisterClasses (const jclass *classes)
>>
>> classes is a pointer to an array of pointers, terminated by NULL.
>> Every one of those pointers should pointo t a valid class structure
>> inside your app.  Print them out.
>
> As an aside, I think there were bugs in some part of the mipsel-linux 
> toolchain (I forget exactly where, but it was either the linker or 
> glibc) that caused problems like this for me.  I think you are on the 
> right track here.  It may be useful to compile libgcj with -O0 -g 
> (edit the Makefile to change -O2 to -O0 and make clean; make).
>
> David Daney

We'll give those changes a try, but I'm curious as the exact problems 
you had, David.  You said "caused problems like this for me".  How 
similar were they?

-Ben



More information about the Java mailing list