linux-ppc port

Fred Dushin fadushin at top.cis.syr.edu
Sun Apr 20 10:06:43 PDT 1997


I'm running into a few problems with the 0.8x versions of kaffe
under linuxppc, and I have a few questions about the status of the port.

1) 0.8.3 has been the only 0.8 version I have been able to get
running successfully, but then only soradically.  0.8.4 compiles
cleanly, but I seem to be having some trouble with threads.
I'd like t report the problem here, then ask for some help diagnosing.
I'm not terribly familiar with kaffe internals (though I'm learning),
and I know less about unix threads.

The problem is a segmentation fault at thread.c:284.  Here's the
gdb trace:

(gdb) run HelloWorldApp
Starting program: /usr/local/bin/java HelloWorldApp

Program received signal SIGSEGV, Segmentation fault.
0x20810c in iresumeThread (tid=0x2b4518) at thread.c:284
284                             for (ntid = TCTX(tid)->blockqueue; *ntid != 0; ntid = &(*ntid)->next) {
(gdb) bt
#0  0x20810c in iresumeThread (tid=0x2b4518) at thread.c:284
#1  0x207a78 in initThreads () at thread.c:164
#2  0x20483c in initialiseKaffe () at baseClasses.c:95
#3  0x203234 in main (argc=2, argv=0x7ffff8cc) at main.c:76
#4  0x20317c in _start ()
(gdb) list
279                     if ((TCTX(tid)->flags & THREAD_FLAGS_ALARM) != 0) {
280                             removeFromAlarmQ(tid);
281                     }
282                     /* Remove from lockQ if necessary */
283                     if (TCTX(tid)->blockqueue != 0) {
284                             for (ntid = TCTX(tid)->blockqueue; *ntid != 0; ntid = &(*ntid)->next) {
285                                     if (*ntid == tid) {
286                                             *ntid = tid->next;
287                                             break;
288                                     }
(gdb) print tid
$1 = (thread *) 0x2b4518
(gdb) print *tid
$2 = {obj = {dtable = 0x2a4118, mux = {holder = 0x0, count = 0,
      muxWaiters = 0x0}, cv = {cvWaiters = 0x0, mux = 0x0}}, name = 0x2b1e98,
  priority = 10, next = 0x0, PrivateInfo = 2, eetop = 0, single_step = 0,
  daemon = 1, stillborn = 0, target = 0x0, interruptRequested = 0, group = 0x0}
(gdb) finish
Run till exit from #0  0x20810c in iresumeThread (tid=0x2b4518) at thread.c:284
java.lang.NullPointerException

Program exited with code 01.
(gdb) quit
%

Could someone guide me here?  The TCTX macro gives me privateInfo
in the threadContext, but I'm not clear on how this works.  Also,
gdb won't let me print out the value doubly dereferenced.  Also,
I can't seem to determine where the NullPointerException is being
thrown.

Does this sound like a threading problem in the linuxppc port?
I'm running linux 2.1.24 on a Macintosh 7200/75.  This is the
monolithic linux, not mklinux.

2) Is anyone working on linux-ppc porting of kaffe?  I'm curious
about whether there is any JIT work going on, and whether any
help is needed.

Jonesin' fer Java,

Fred Dushin
Syracuse, NY



More information about the kaffe mailing list