]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: AddressSanitizer (ASan) build options
authorJouni Malinen <j@w1.fi>
Sun, 30 Nov 2014 13:52:28 +0000 (15:52 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 30 Nov 2014 13:53:11 +0000 (15:53 +0200)
Add example build options that can be used to enable ASan for hwsim test
cases.

Signed-off-by: Jouni Malinen <j@w1.fi>
tests/hwsim/example-hostapd.config
tests/hwsim/example-wpa_supplicant.config

index 5acb0ce484028b2b14fbcb2cba72b078674f2942..36cf45696954e8cb0078f92e3578ec82090afb51 100644 (file)
@@ -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
index 0dbb80e565259209dc08181be6d3649e319b3b5d..37f074f810572c34c7b331483e4ae55bb8f846b7 100644 (file)
@@ -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