Re: Kernel bugs found using inspect tool

From: Ricky Beam (jfbeam@bluetopia.net)
Date: Tue Feb 22 2000 - 23:32:29 EST


On Tue, 22 Feb 2000, Rupp, Ed J wrote:
>the AT&T toolchest called 'inspect'. I found 10 near-certain
>bugs which may or may not be causing any observable problems
>and 13 probable bugs which I couldn't immediately tell if they

Oh, this is funny!

(yes, I reorderd them)
...
>drivers/scsi/53c7,8xx.c: extra semicolon near line 3152
> for (bp = (struct NCR53c7x0_break *) host->breakpoints;

Full context:
    for (bp = (struct NCR53c7x0_break *) host->breakpoints;
            bp; bp = (struct NCR53c7x0_break *) bp->next); {

>drivers/char/joystick/joy-creative.c: extra semicolon near line 69
> for (i = 0; i < 2; i++); {

*grin* Those two are just classic! It's been 6 years since I've seen such
beautiful snafu's. (I used to teach FORTRAN labs.)

...
>drivers/net/pcmcia/netwave_cs.c: bitwise-or in conditional context near line
>1319
> if ((dev == NULL) | (!dev->start))

Oh well. This line has to be rewritten anyway. (dev->start no longer exists.)

>===== Questionable ====
>arch/ppc/math-emu/op-4.h: comparison takes precedence over assignment near
>line 215
> (x3 += ((x2 += ((x1 += ((x0 += i) < x0)) < x1) < x2)))

Eww... I'm too tired to read lines like that.

...
>drivers/char/sx.c: missing logical operator near line 627
> for (i=0; i < TIMEOUT_1 > 0;i++)
>drivers/char/sx.c: missing logical operator near line 633
> for (i=0; i < TIMEOUT_2 > 0;i++) {
>drivers/char/sx.c: missing logical operator near line 655
> for (i=0; i < TIMEOUT_1 > 0;i++)
>drivers/char/sx.c: missing logical operator near line 661
> for (i=0; i < TIMEOUT_2 > 0;i++) {

TIMEOUT_1 and TIMEOUT_2 are numbers, btw. This one wins a cardboard cookie.
(You'll be required to show up in person to collect it.)

...
>drivers/net/fc/iph5526.c: missing logical operator near line 3773
> for (i = 0; i < clone_list[i].vendor_id != 0; i++)

This one is the runner-up for the cardboard cookie.

...
>drivers/sound/lowlevel/aci.c: comparison takes precedence over assignment
>near line 390
> return (*(int *) arg = (status & 0x20) == 0);

But it didn't complain about (a few lines above):
        aci_solo = !!*(int *) arg;

--Ricky

PS: Now if it could find stuff that isn't so "cosmetic"...

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed Feb 23 2000 - 21:00:32 EST