Calling discard_cache() is likely to result in a call to free_memblock(), which will call valgrind_make_blocks_noaccess() before returning. This causes valgrind to report an invalid read on the next iteration through the loop in alloc_memblock(). Fix by explicitly calling valgrind_make_blocks_defined() after discard_cache() returns. Also call valgrind_make_blocks_noaccess() before calling discard_cache(), to guard against free list corruption while executing cache discarders. Signed-off-by: Michael Brown <mcb30@ipxe.org>tags/v1.20.1
|
|
||
284 |
|
284 |
|
285 |
|
285 |
|
286 |
|
286 |
|
|
287 |
|
|
287 |
|
288 |
|
288 |
|
289 |
|
289 |
|
290 |
|
|
|
||
371 |
|
372 |
|
372 |
|
373 |
|
373 |
|
374 |
|
374 |
|
|
|
|
375 |
|
|
|
376 |
|
|
|
377 |
|
|
|
378 |
|
|
|
379 |
|
|
|
380 |
|
|
|
381 |
|
|
375 |
|
382 |
|
376 |
|
383 |
|
377 |
|
384 |
|