[PATCH] malloc: Enable assertions if UNIT_TEST is enabled

Simon Glass sjg at chromium.org
Tue Oct 10 16:57:37 CEST 2023


On Sat, 7 Oct 2023 at 20:02, Sean Anderson <seanga2 at gmail.com> wrote:
>
> 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 at gmail.com>
> ---
>
>  common/dlmalloc.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>

Reviewed-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list