tests: AddressSanitizer (ASan) build options

Add example build options that can be used to enable ASan for hwsim test
cases.

Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2014-11-30 15:52:28 +02:00
parent 4f9a5ea5cc
commit 6ef319f4ea
2 changed files with 19 additions and 0 deletions

View file

@ -74,3 +74,13 @@ CONFIG_TESTING_OPTIONS=y
CONFIG_MODULE_TESTS=y CONFIG_MODULE_TESTS=y
CONFIG_SUITEB=y CONFIG_SUITEB=y
# AddressSanitizer (ASan) can be enabled by uncommenting the following lines.
# This can be used as a more efficient memory error detector than valgrind
# (though, with still some CPU and memory cost, so VM cases will need more
# memory allocated for the guest).
#CFLAGS += -fsanitize=address -O1 -fno-omit-frame-pointer -g
#LIBS += -fsanitize=address -fno-omit-frame-pointer -g
#LIBS_h += -fsanitize=address -fno-omit-frame-pointer -g
#LIBS_n += -fsanitize=address -fno-omit-frame-pointer -g
#LIBS_c += -fsanitize=address -fno-omit-frame-pointer -g

View file

@ -119,3 +119,12 @@ CONFIG_TESTING_OPTIONS=y
CONFIG_MODULE_TESTS=y CONFIG_MODULE_TESTS=y
CONFIG_SUITEB=y CONFIG_SUITEB=y
# AddressSanitizer (ASan) can be enabled by uncommenting the following lines.
# This can be used as a more efficient memory error detector than valgrind
# (though, with still some CPU and memory cost, so VM cases will need more
# memory allocated for the guest).
#CFLAGS += -fsanitize=address -O1 -fno-omit-frame-pointer -g
#LIBS += -fsanitize=address -fno-omit-frame-pointer -g
#LIBS_c += -fsanitize=address -fno-omit-frame-pointer -g
#LIBS_p += -fsanitize=address -fno-omit-frame-pointer -g