I developed a C (non-GUI) C command-line program on Linux using QT Creator, which internally uses gdb as its debugger. When I debugged a program in Windows using Visual Studio, it reported that it was writing outside of the allocated memory (although it did not report a violation at the time it happened, so it was still difficult to track). In the end, I managed to find a place in the code where the malloc call allocated too little memory, and this solved the problem.
However, it bothers me that this problem was never detected on the Linux side. Are there any switches or something that would enable this detection feature in Linux?
source
share