]> git.dujemihanovic.xyz Git - u-boot.git/commit
malloc: Enable assertions if UNIT_TEST is enabled
authorSean Anderson <seanga2@gmail.com>
Sun, 8 Oct 2023 02:01:56 +0000 (22:01 -0400)
committerTom Rini <trini@konsulko.com>
Wed, 11 Oct 2023 17:22:29 +0000 (13:22 -0400)
commit1786861415f4494a38630584a8fbc9c939a024ce
treebf49b2d39cf93afcec1694ee0c61c1945591fb5e
parent9214da7b931e7ee150a2f1da80af2a20ce8194ab
malloc: Enable assertions if UNIT_TEST is enabled

dlmalloc has some sanity checks it performs on free() which can help detect
memory corruption. However, they are only enabled if DEBUG is defined before
including common.h. Define DEBUG earlier if UNIT_TEST is enabled so that
assertions are enabled in sandbox.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
common/dlmalloc.c