|
From: Paul F. <pa...@fr...> - 2013-12-20 20:24:55
|
On 20 Dec 2013, at 19:16, Nick Savoiu wrote: > Hi all, > > Valgrind's typical output > > ==19182== Invalid write of size 4 > ==19182== at 0x804838F: f (example.c:6) > ==19182== by 0x80483AB: main (example.c:11) > ==19182== Address 0x1BA45050 is 0 bytes after a block of size 40 alloc'd > ==19182== at 0x1B8FF5CD: malloc (vg_replace_malloc.c:130) > ==19182== by 0x8048385: f (example.c:5) > ==19182== by 0x80483AB: main (example.c:11) > > is not very diff-friendly. Is there a way to suppress process id and address printing? Perhaps something like > > ==?????== Invalid write of size 4 > ==?????== at 0x???????: f (example.c:6) > ==?????== by 0x???????: main (example.c:11) > ==?????== Address 0x??????? is 0 bytes after a block of size 40 alloc'd > ==?????== at 0x???????: malloc (vg_replace_malloc.c:130) > ==?????== by 0x???????: f (example.c:5) > ==?????== by 0x???????: main (example.c:11) > > or > ==== Invalid write of size 4 > ==== at : f (example.c:6) > ==== by : main (example.c:11) > ==== Address is 0 bytes after a block of size 40 alloc'd > ==== at : malloc (vg_replace_malloc.c:130) > ==== by : f (example.c:5) > ==== by : main (example.c:11) Even this is not very diff-friendly (changing line numbers will cause diffs). I recommend enabling suppression generation (--gen-suppressions=yes). Then you can filter anything that isn't between braces. Or even simply use suppression file(s), in which case if there is a new or changed callstack you will get new errors. A+ Paul |