[9083] in Athena Bugs
2 bugs on the sun4: 1 Xsaber bug and 1 C bug
daemon@ATHENA.MIT.EDU (Derek Atkins)
Thu Mar 12 22:09:00 1992
To: bugs@MIT.EDU
Date: Thu, 12 Mar 92 22:08:42 EST
From: Derek Atkins <warlord@MIT.EDU>
I was running a program in xsaber and I found one (and possibly more)
bugs. This was on a deathtongue, a sun4 in SIPB, running SunOS 4.1.2
and somewhat athena. (well, its a combination 7.2/7.3, depending how
you look at it)
Anyways, I was working on my Hostmanager, and it wasnt handling
interrupts properly. I had implemented both the original zhm.c and
also incorporated marc's changes (see zbugs, [0349]). Both things
did not work.
The program would get to recvfrom and would not break out of it
when it got a SIGALRM. Compiling using 'cc' obtained code that
WOULD break out when SIGALRM happened. This is clearly a bug in
saber, since the same code, without changes, worked in the compiled
version.
The second bug, which is evident in both C and in xsaber is that break
doesnt always break out of a do while loop. In resend_notices in
queue.c (in the zephyr code), it will loop CONTINUOUSLY until the
condition is met. It is checking a time vs. the current time, and if
it is not valid, tries to break out, but it DOESNT. (Fix is to move
the line srch = srch->q_forw to right above the closing while
statement). This is the code:
do {
if (srch->q_data->timeout <= time((time_t *)0)) {
if (++(srch->q_data->retries) > MAXRETRIES) {
new_server((char *)NULL);
break;
} else {
...
}
srch->q_data->timeout = time((time_t *)0) + NOTICE_TIMEOUT; srch = srch->q_forw;
}
}
} while (srch != &hm_queue);