I've modified the small part of a simulator but I've faced to strange segmentation fault. GDB shows the error is appear from a class where I've not modified. I guess my code has memory access violation upon accessing its own array which accordingly destroys the content of other array (allocated in the program memory space). Is there any debugging tool to detect out-of-array-bound but inside-the-program-space accesses?
In short, Valgrind will do this. Just run it as valgrind /path/to/executable
You are looking for valgrind.
It is available as a package on at least most linux distributions, and will detect memory access.
Just start the program with valgrind:
valgrind ./program
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With