Jerry James <james(a)xemacs.org> wrote:
Right. I am not using motif, and I have RedHat's XFree86-4.3.0-2
RPM
installed. As it turns out, valgrind did me no good at all in this
case. I'm trying to figure out how to make it detect stack errors
(which it is supposed to do out of the box) before I try again.
Unfortunately, I don't think valgrind can detect the kind of errors
that you had in your test program. I think the issue is that your
program was writing into "valid" areas of the stack (that is, an address
above $esp). To do what you want, valgrind would have to know what
parts of the stack belongs to data, and what parts of the stack belongs
to bookkeeping info (return addresses, saved registers, etc.), but
valgrind has no way of knowing that.
[ Now, if your program started writing to negative array indices,
valgrind would have a chance of detecting that, but I don't know if it
actually does. ]
--
Darryl Okahata
darrylo(a)soco.agilent.com
DISCLAIMER: this message is the author's personal opinion and does not
constitute the support, opinion, or policy of Agilent Technologies, or
of the little green men that have been following him all day.