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]
Other format: [Raw text]

Re: seg fault on startup


Ben Tatham wrote:
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?

You get a SIGSEGV, I got a SIGSEGV, so I would say the problems were identical from the point of view of symptoms. But I fixed the problems I had, and you still suffer from SIGSEGV, so from that point of view they are not the same problem.


I know that is not at all helpful. You will have to run it in the debugger and see what is happening. Unfortunately I know of no short cuts.

David Daney


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