u-boot/arch/sandbox
Andrew Scull 1e578ed20c sandbox: Add support for Address Sanitizer
Add CONFIG_ASAN to build with the Address Sanitizer. This only works
with the sandbox so the config is likewise dependent. The resulting
executable will have ASAN instrumentation, including the leak detector
that can be disabled with the ASAN_OPTIONS environment variable:

   ASAN_OPTIONS=detect_leaks=0 ./u-boot

Since u-boot uses its own dlmalloc, dynamic allocations aren't
automatically instrumented, but stack variables and globals are.

Instrumentation could be added to dlmalloc to poison and unpoison memory
as it is allocated and deallocated, and to introduce redzones between
allocations. Alternatively, the sandbox may be able to play games with
the system allocator and somehow still keep the required memory
abstraction. No effort to address dynamic allocation is made by this
patch.

The config is not yet enabled for any targets by default.

Signed-off-by: Andrew Scull <ascull@google.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2022-06-23 12:58:18 -04:00
..
cpu linker_lists: Rename sections to remove . prefix 2022-06-23 12:58:18 -04:00
dts test: Load mac address using misc device 2022-06-08 14:00:22 -04:00
include/asm sandbox: Rename getopt sections 2022-06-23 12:58:18 -04:00
lib sandbox: Rename EFI runtime sections 2022-06-23 12:58:18 -04:00
config.mk sandbox: Add support for Address Sanitizer 2022-06-23 12:58:18 -04:00
Kconfig sandbox: Add a build for VPL 2022-05-02 09:58:13 -04:00
Makefile sandbox: fix build failure with musl and SDL 2022-02-09 12:26:12 -07:00