> *speculating*, the reason `valgrind' is not
> finding the auto example is because it does
> not know how big the auto array is.
> it should be able to detect overwriting critical
> stack frame data, such as (in this case) the return
> address (at least). one guess is that that is
> simply not implemented, at least not in the
> version I used? I can imagine difficult technical
> issues here, but will continue to make the point
> that the pushed return address, at least, should
> _never_ be overwritten whilst the stack frame is
> live, which is well within `valgrind's ability to
> detect (AFAIK).
I believe valgrind doesnt do anything with stacks. See FAQ entry 6.2:
I skimmed the docs Brian mentioned,
(http://valgrind.org/docs/manual/mc_techdocs.html) and I got the
impression that it should be able to do analysis on the stack:
Valgrind operates on its own stack, VG_(stack), which it switches to
at startup, temporarily switching back to the client's stack when
doing system calls for the client.
but probably not detecting auto-arrays, for the reasons Brian mentioned.
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!