From: Jouni Malinen Date: Tue, 7 Jul 2015 14:00:12 +0000 (+0300) Subject: tests: Add Undefined Behavior Sanitizer (ubsan) configuration X-Git-Tag: hostap_2_5~458 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1f560ff08ffc3f5c810dd6fc4908b4adadf692e9;p=thirdparty%2Fhostap.git tests: Add Undefined Behavior Sanitizer (ubsan) configuration This allows hostapd and wpa_supplicant to be built for hwsim test cases with ubsan functinality from the recent gcc/clang compiler versions. Signed-off-by: Jouni Malinen --- diff --git a/tests/hwsim/example-hostapd.config b/tests/hwsim/example-hostapd.config index 9c8cea19b..463261f83 100644 --- a/tests/hwsim/example-hostapd.config +++ b/tests/hwsim/example-hostapd.config @@ -85,3 +85,14 @@ CONFIG_SUITEB=y #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 + +# Undefined Behavior Sanitizer (UBSan) can be enabled by uncommenting the +# following lines. +#CFLAGS += -Wno-format-nonliteral +#CFLAGS += -fsanitize=undefined +##CFLAGS += -fno-sanitize-recover +#LIBS += -fsanitize=undefined +##LIBS += -fno-sanitize-recover +#LIBS_h += -fsanitize=undefined +#LIBS_n += -fsanitize=undefined +#LIBS_c += -fsanitize=undefined diff --git a/tests/hwsim/example-wpa_supplicant.config b/tests/hwsim/example-wpa_supplicant.config index 225ac2461..c03c1fa3c 100644 --- a/tests/hwsim/example-wpa_supplicant.config +++ b/tests/hwsim/example-wpa_supplicant.config @@ -129,3 +129,13 @@ CONFIG_SUITEB=y #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 + +# Undefined Behavior Sanitizer (UBSan) can be enabled by uncommenting the +# following lines. +#CFLAGS += -Wno-format-nonliteral +#CFLAGS += -fsanitize=undefined +##CFLAGS += -fno-sanitize-recover +#LIBS += -fsanitize=undefined +##LIBS += -fno-sanitize-recover +#LIBS_c += -fsanitize=undefined +#LIBS_p += -fsanitize=undefined