Browse Source
vg_prepare_blob() assumes a valid return from fdt_num_mem_rsv() in order to make sensible initialization of the valgrind mem checker. Usually that's fine, but it breaks down on the (deliberately corrupted) truncated_memrsv testcase. That led to marking a negative-size (== enormously sized once cast to size_t) as defined with VALGRIND_MAKE_MEM_DEFINED, which casued valgrind to freeze up and consume ludicrous amounts of memory until OOMing. This correction makes us robust in that case. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>main
David Gibson
6 years ago
1 changed files with 8 additions and 6 deletions
Loading…
Reference in new issue