Before I try to work around that: What kinds of malloc misuses and memory access errors will DEBUG_MALLOC actually detect, which valgrind won't? Is it something we want to keep?
The main feature of DEBUG_MALLOC, is that it often is capable of determining where the bug that generated the leak is (typically a reference counting bug), where as valgirnd/memcheck would only indicate where it was allocated. It also integrates with the gc, so that for nested structures only the root leak is reported.
I'd like to keep it.
/grubba