mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-28 15:41:40 +00:00
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>
This commit is contained in:
parent
9214da7b93
commit
1786861415
1 changed files with 4 additions and 4 deletions
|
@ -8,14 +8,14 @@
|
||||||
* as file malloc-2.6.6.c.
|
* as file malloc-2.6.6.c.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <common.h>
|
|
||||||
#include <log.h>
|
|
||||||
#include <asm/global_data.h>
|
|
||||||
|
|
||||||
#if CONFIG_IS_ENABLED(UNIT_TEST)
|
#if CONFIG_IS_ENABLED(UNIT_TEST)
|
||||||
#define DEBUG
|
#define DEBUG
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <common.h>
|
||||||
|
#include <log.h>
|
||||||
|
#include <asm/global_data.h>
|
||||||
|
|
||||||
#include <malloc.h>
|
#include <malloc.h>
|
||||||
#include <asm/io.h>
|
#include <asm/io.h>
|
||||||
#include <valgrind/memcheck.h>
|
#include <valgrind/memcheck.h>
|
||||||
|
|
Loading…
Reference in a new issue