Search Linux Wireless

[PATCH 5/7] wmediumd: support compilation with asan/ubsan

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Johannes Berg <johannes.berg@xxxxxxxxx>

Use "make SANITIZE=1" to get asan/ubsan for checking for errors.

---
 wmediumd/Makefile | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/wmediumd/Makefile b/wmediumd/Makefile
index 585f488a9bd5..f75c4e8b4e3e 100644
--- a/wmediumd/Makefile
+++ b/wmediumd/Makefile
@@ -53,6 +53,12 @@ OBJECTS=wmediumd.o config.o per.o
 OBJECTS += lib/loop.o lib/sched.o lib/schedctrl.o
 OBJECTS += lib/uds.o lib/vhost.o lib/wallclock.o
 
+ifeq ($(SANITIZE),1)
+CFLAGS += -fsanitize=undefined,address
+# apparently these have to come first for some reason
+override LDFLAGS := -lasan -lubsan $(LDFLAGS)
+endif
+
 all: wmediumd 
 
 wmediumd: $(OBJECTS) 
-- 
2.25.1




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux