|
From: Nicholas N. <nj...@ca...> - 2004-01-19 22:09:20
|
On Sun, 18 Jan 2004, Tom Hughes wrote: > It would probably be easier for valgrind just to keep a shadow > stack of return addresses which is added to on call and popped > from on ret with a check that the address on that shadow stack > matches the real stack. That has fairly low overhead. > > What will cause problems with that is setjmp/longjmp and other > non local control mechanisms such as signals and exceptions. Nope, not easy at all; as you mention, due to longjmps. Also tail calls and stack switching complicate things. Not being able to match up function entries and exits (and the corresponding frame builds/tear-downs) was why I haven't managed to get Annelid to do stack checking, which is a real shame. N |