Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Simulating malloc failures

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.

Name: Anonymous 2009-03-16 14:33

>>13
Why the hell are ``rand" and ``backward compatibility" in the same sentence? rand() IS SUPPOSED TO BE RANDOM, ERGO ONE CANNOT RELY ON ITS RESULTS!

If you mean that, given the same seed, rand() should return the same sequence of numbers, then I'd agree; however, any application that relies on that sequence being the same across different platforms and not just different runs on the same platform is DOING IT WRONG

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List