Re: Super Lint (was: Unexecutable Stack / Buffer Overflow Exploits...)

Joe Buck (jbuck@synopsys.COM)
Tue, 4 Jan 0 9:39:39 PST


Undecidability simply means that any correct program that attempts to
do certain kinds of analysis must return a three-valued answer: yes,
no, or "I can't tell". gcc is already full of code that attempts to
solve undecidable problems: warning about code that will never be
reached, or warning about using variables before they are initialized,
is one obvious example:

CODE;
STATEMENT;

STATEMENT is reached iff CODE halts, so we must solve the halting problem
to tell, in general, which statements can be reached. If STATEMENT uses a
variable that is not set, then we can't write a perfect -Winitialized
without solving the halting problem.

Yet we have a useful -Winitialized anyway; it warns in the "I can't tell"
cases as well as in the "yes" cases.

-
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/