|
From: Henrik N. <hn...@ma...> - 2004-01-22 13:21:33
|
I am currently fighting with a bad case of "return into 0" due to a smashed stack like what was discussed by S=E9bastien de Menten some days = ago in the memory check on the stack thread. After some analysis of the problem I have some ideas on what valgrind can do to help nailing these down. As valgrind is running an emulation it should be possible to detect function entry/exit and then change the protection of the return address, frame pointer etc on the stack to read-only until return from the function (where the same gets fully protected as it is now outside the active stack area). This way it should be possible to detect these errors better than StackGuard or other simila= r approaches to the problem without having to instrument the binary code. Rebuilding applications and all relevant libraries with full instrumentation like mudflap is also an option I guess, but not by far as= =20 easy for the developer. Regards Henrik |