Re: Kernel bugs found using inspect tool

From: Mikael Pettersson (mikpe@csd.uu.se)
Date: Fri Feb 25 2000 - 10:40:42 EST


Ricky Beam writes:
> 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
> ...
> >===== Questionable ====
> >arch/ppc/math-emu/op-4.h: comparison takes precedence over assignment near
> >line 215
> > (x3 += ((x2 += ((x1 += ((x0 += i) < x0)) < x1) < x2)))

This whole expression is broken.
The evaluation order for the "<" operator is unspecified, which means that
subexpressions like "((x0 += i) < x0)" do not have well-defined values.
They also violate the ANSI-C rules about permissible accesses and updates
of variables between sequence points.

/Mikael

-
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 : Tue Feb 29 2000 - 21:00:12 EST