seg fault on startup

Ben Tatham bentatham@nanometrics.ca
Tue Mar 20 16:06:00 GMT 2007


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.  Does this mean anything to anyone?    Why does it say 
that the language is c++ now though? 

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)
(gdb) bt
#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
#1  0x100033ac in frame_dummy ()
#2  0x10003234 in _init ()
#3  0x10a500f8 in __libc_csu_init ()
#4  0x0fcf2e5c in __gconv_transform_utf8_internal () from /lib/libc.so.6
#5  0x00000000 in ?? ()
Current language:  auto; currently c++

Thanks,
Ben


Andrew Haley wrote:
> Ben Tatham writes:
>  > Andrew Haley wrote:
>  > > Ben Tatham writes:
>  > >  > (gdb) info share
>  > >  > >From        To          Syms Read   Shared Object Library
>  > >  >                         No          /usr/lib/libgcc_s.so.1
>  > >  > 0x0f1e5000  0x0f9158a8  Yes         /usr/lib/libgcj.so.7
>  > >  > 0x0e7324f0  0x0e749f8c  Yes         /lib/libm.so.6
>  > >  > 0x0e6c22b0  0x0e6ccc4c  Yes         /lib/libpthread.so.0
>  > >  > 0x0e69bea0  0x0e69cd80  Yes         /lib/libdl.so.2
>  > >  > 0x0e551a40  0x0e6543e8  Yes         /lib/libc.so.6
>  > >  >                         No          /lib/ld.so.1
>  > >  > 
>  > >  > 
>  > >  > And the links on my target platform...confirming I am running the 
>  > >  > correct shared libs. 
>  > >
>  > > You need to go into the debugger to find out what is at
>  > >
>  > >   
>  > >>  > #5696 0x7ffff998 in ?? ()
>  > >>     
>  > 
>  > yes, but how? 
>
> Lots of ways.  Display the insns there with disp/i 0x7ffff998
> Put a BP on the caller.
>   



More information about the Java mailing list