I'm writing quite a big program, and there's a rather irritating bug in it - it intermittently crashes and dumps the core (sig 11 - segmentation fault) on calls to malloc() and free().
Where this happens is vaguely reproducable - but not enough to be able to track down why.
The way I see it, the problem is one of two things: either a bug in the compiler (v. unlikely), or some part of my program is writing over some memory map table that malloc/free use to operate (not sure really - I don;t know how they work internally).
Anyone got any ideas? I think I need a debugging tool to track _every_ memory write and report those which write to areas other than my variables / allocated chunks - is there such a tool?