I'm using Boehm GC and valgrind.
But it seems valgrind cannot detect overflow in GC_malloc'ed buffers.
Does anyone know any tools that can detect buffer overflow for Boehm GC?
Software Recommendations Stack Exchange is a question and answer site for people seeking specific software recommendations. It only takes a minute to sign up.Sign up to join this community
Our CheckPointer tool may be able to do what you want.
You didn't specifically say how valgrind failed, only that it did. It is known that valgrind cannot detect certain kinds of memory access errors. It certainly can't detect buffer overflows for a buffer within a struct or a buffer allocated in local stack space, because it doesn't have any knowledge of the size of those buffers. The area around the buffer is by definition valid data space and so accesses are "valid" from valgrind's point of view, even if it is off the edge of the buffer.
In contrast, CheckPointer reads your C source code and collects information about the data types (and therefore their sizes). This gives it the key information needed to do that detection. After collection of type information, it then instruments the code to watch for errors in memory access. It will catch the above errors, and a wide variety of others.
CheckPointer presently is only available for C.
This is a product of my company, so don't take this as a recommendation. I'm merely documenting that it exists and apparantly matches your requirements.