Are there any utilities for Linux/Widows which check for array bound violations and possibly stack corruption in C++ programs?
Something like an emulation of runtime provided in other languages?
Thanks
Are there any utilities for Linux/Widows which check for array bound violations and possibly stack corruption in C++ programs?
Something like an emulation of runtime provided in other languages?
Thanks
Check out valgrind and efence. Also, prefer a std::vector to an array and if you're really afraid use the .at method to access any elements in the vector, .at is guranteed to do bounds checking.
orbitz, thanks. valgrind looks useful.
I need it as cure rather than prevention, debugger sometimes doesn't tell you enough about the real location of error, especially in case of stack corruption.