From: Jouni Malinen Date: Sun, 30 Nov 2014 13:52:28 +0000 (+0200) Subject: tests: AddressSanitizer (ASan) build options X-Git-Tag: hostap_2_4~962 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6ef319f4ead98491d70a6aac292245d2d2f184ff;p=thirdparty%2Fhostap.git 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 --- diff --git a/tests/hwsim/example-hostapd.config b/tests/hwsim/example-hostapd.config index 5acb0ce48..36cf45696 100644 --- a/tests/hwsim/example-hostapd.config +++ b/tests/hwsim/example-hostapd.config @@ -74,3 +74,13 @@ CONFIG_TESTING_OPTIONS=y CONFIG_MODULE_TESTS=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 diff --git a/tests/hwsim/example-wpa_supplicant.config b/tests/hwsim/example-wpa_supplicant.config index 0dbb80e56..37f074f81 100644 --- a/tests/hwsim/example-wpa_supplicant.config +++ b/tests/hwsim/example-wpa_supplicant.config @@ -119,3 +119,12 @@ CONFIG_TESTING_OPTIONS=y CONFIG_MODULE_TESTS=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