Bounds Checking for Open Source Code?
roarl asks: "Is anyone working on an Open Source bounds checking system? (A system that checks a program at runtime for array out of bounds access, reading uninitialized memory, memory leaks and so on). I've been using BoundsChecker for some time and believe me, there are situations where you know you are going to spend hours debugging unless you let BoundsChecker sort it out for you. But it annoys me that I have to transfer (and sometimes port) the buggy program to Windows each time. I'd much rather stay in Linux.
Insure works on Linux. I haven't tried Insure for some time, but last time I tried I wasn't especially impressed. Purify seems still not to support Linux, but on other Unix platforms it works great. The problem with all of these products is that they are so da*n expensive. So it makes me wonder, are all Open Source programmers doing without them? If so, what can we expect of the quality of Open Source developed programs? If not, is there a free alternative?"
waaah waaah. quit whining and write your own. a basic malloc/free implementation with hooks to mprotect takes a few hours max to write. POSIX even defines how the faulting address is returned to a signal handler so you can correlate the fault back to the source of the allocation or free. Last I tried, linux's return wasn't POSIX compliant but it was easy to work around with an ifdef.
then extend free to scan the outstanding objects for stale pointers into the object you're freeing and produce run-time warnings.
if you have a memory intensive application, you may need to limit the debugging to selective malloc sizes or only apply the debugging to specific object pools (if you use a pool allocator)
if you're a compentent programmer, it will take you a day to get all the kinks out. if you're not, go use java with all the other retards.