Browse Source

tests: Update valgrind suppressions for sw_tree1

This test builds a tree in a previously uninitialized buffer, then writes
the whole buffer out to a file to be used by other tests.  Because part of
the buffer may be uninitialized this causes a valgrind error.

Pre-initializing the buffer would remove the error, however it would make
valgrind not notice any accesses to the uninitialized portion *before* the
write out, and those would be genuine errors.

So, instead we use a valgrind suppressions file - however it has a couple
of problems.  First it unnecessarily lists the same call path twice.
Second, the call path is only right for some C library versions.  Change
the second copy to cover possible path that occurs with a different glibc
version.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
main
David Gibson 7 years ago
parent
commit
14a3002a1a
  1. 2
      tests/sw_tree1.supp

2
tests/sw_tree1.supp

@ -11,7 +11,7 @@ @@ -11,7 +11,7 @@
allocation methods causes uninitialized data in alignment gap
Memcheck:Param
write(buf)
fun:__write_nocancel
fun:write
fun:utilfdt_write_err
fun:save_blob
fun:main

Loading…
Cancel
Save