Version: (using KDE 3.5.8) Installed from: 00 OS: Linux Add an option to check for error handling correctness. It should works like this: For every malloc(), (f)open(), (f)write(), (f)read(), etc operation, check the current stacktrace. If this is the first time we encounter this specific stacktrace, store it in a database (for example a file given by the user) and INTENTIONALLY return a failure for that specific operation (i.e. NULL for malloc, -1 for open(), NULL for fopen() etc). Next the time software is run, read in the database and let the known entries operate normally, i.e. mostly succeed. This will allow one to check also leaks from the abnormal execution paths. A killer idea in my opinion!
Created attachment 74044 [details] Failgrind a malloc/syscall fault injector tool
Created attachment 79727 [details] Patch for adding failgrind This first try is based on the none tool and I have implemented only to fail malloc, open, read, write, fopen, socket, send recv and bind functions. Failgrind support theses options: --failfunc for selecting which functions may fail. Example: --failfunc=malloc,open --failclass for selecting a whole class of functions which may fail. Example --failclass=1 for failing open,read,write --percent for choosing the percentage of function that will fail. Example: valgrind --tool=exp-failgrind --percent=90 --failfunc=all ls This command will launch ls and each function call have 90% chance to fail.