Re: report on a crash of linux-2.2.7.SuSE

Jeffrey A Law (law@cygnus.com)
Sat, 10 Jul 1999 21:05:44 -0600


In message <UTC199907102242.AAA17825.aeb@papegaai.cwi.nl>you write:
> # cc -Wall -O2 -c foo.c
> foo.c: In function `foo':
> foo.c:18: warning: `mbo' might be used uninitialized in this function
> #
>
> Strange.. - mbo is used after an assignment to it.
> How can it be uninitialized?
> And the strange part is, this is a minimal example:
> every simplification of this example makes the complaint go away.
> (Changing fn to be void (*fn)(void); or deleting the
> `else printk("fn NULL?\n");' part, or deleting the `return;',
> or changing the panic into a printk.
> Also deleting the -O2 flag makes the complaint go away.)
This happens because the code to detect this case is really dumb and gets
confused by global code motion algorithms such as the one we use for global
cse.

jeff

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