These are slightly rough around the edges, but I think they are useful. They already helped me track down a memory leak in notmuch new (id:1355234087-6886-1-git-send-email-david@tethera.net, id:1355196820-29734-1-git-send-email-david@tethera.net) They also would have caught the restore leak Jani pointed out in parse_sup_line, although that is a bit of hindsight since I didn't write the obvious test until Jani pointed out the leak.