I just found a difficult bug in my program. The program was freely writing outside the bound of an array on the shared memory segment with no notice.
I am currently using Valgrind to check for memory leaks and memory corruption on dynamic memory and AddressSanitizer for memory corruption on stack memory.
But those tools are not finding memory corruptions on inter-process shared memory. Is there a good tool for this purpose ?
I think a tool which is performing code instrumentation like AddressSanitizer can detect at least out of bounds accesses. But AddressSanitizer is not doing this compile time instrumentation on shared memory. So I am looking for a tool able to operate on shared memory. Is there any ?
I am not searching for a way to detect problems with concurrent accesses, just at least out of bounds accesses when only one process is writing.
I am programing in C++ and I have control over the compilation process of the executable that is creating the SHM segment and the executables that are reading and writing on it.