Ulrich Drepper wrote:

> Thomas Dickey <[EMAIL PROTECTED]> writes:
>
> > I'm told that AIX's compiler does not necessarily do this for uninitialized
> > values (and have received a number of patches to make things initialized on
> > that platform).
>
> THis would be the OS which is responsible, not the compiler.  In any
> case, I cannot believe this.  All kinds of code depends on this.

Well, in fact I *do* know some case where static variable will not be
initialized, but this is very special, this for embedded software where
everything is counted.
And you can not count on embedded software compilers to respect standards.

Coming back to the point, using ElectricFence if possible will be the best way to
detect a mad pointer.
If there was a way to use hbreak in gdb to watch all write access to that
variable, this would be effective too, but hbreak does not seem to be implemented
on x86, at least in my version of gdb.

-
Linux-UTF8:   i18n of Linux on all levels
Archive:      http://mail.nl.linux.org/lists/

Reply via email to