[kaffe] BUG: assertion failure with freenet on kaffe-cvs

Christian chth at gmx.net
Sun Mar 30 07:19:01 PST 2003


Hi,

The assertion in
 ./kaffe/kaffevm/systems/unix-jthreads/jthread.c lines 1934
 jmutex_unlock(jmutex *lock)
 {
        intsDisable();
        lock->holder = NULL;
        if (lock->waiting != 0) {
                jthread* tid;
                tid = lock->waiting;
                lock->waiting = tid->nextQ;
                assert(tid->status != THREAD_RUNNING);

is sometimes triggered, while in

 ./kaffe/kaffevm/systems/unix-jthreads/jthread.c lines 1286
        jmutex_lock(&threadLock);
        jtid = newThreadCtx(threadStackSize);
        if (!jtid) {
                jmutex_unlock(&threadLock);
                jthread_enable_stop();
                return 0;
        }
        jtid->priority = pri;
        jtid->jlThread = jlThread;
        jtid->status = THREAD_SUSPENDED;  // HERE

the jtid->status is set to THREAD_SUSPENDED.
I didnt digged much into the kaffe source-code, so the question:
Is tid->status==jtid->status in that context?
If yes the assertion test is not correct.
If no .. mhm theres a bug somehere else.

btw: kaffe compiled with --disable-debug (no assertions) seems to work
fine so far, so i concluded that it might be that only the assertion is
wrong.

cheers
	Christian



PS: i'm not subscribed to this list, CC: responses to me directly




More information about the kaffe mailing list