Name: Anonymous 2009-03-15 16:50
Is there something like valgrind that can make certain calls to malloc (also system calls could be interesting) fail? My poor error paths never get tested.
#define randomly_fail_malloc(x) ((rand()&1)?malloc(x):0)