]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
fuzzer-no-link needs to be passed to the compiler and linker step
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Tue, 2 Nov 2021 14:00:32 +0000 (10:00 -0400)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Tue, 2 Nov 2021 14:01:37 +0000 (10:01 -0400)
configure
configure.ac
src/bin/fuzzer.mk

index 30aa6560da6737b4c6640746068ad04c42353b1b..fd740722571cbad692df954addaea0f8b479fa50 100755 (executable)
--- a/configure
+++ b/configure
@@ -14939,7 +14939,7 @@ printf "%s\n" "$ax_cv_cc_wimplicit_fallthrough_flag" >&6; }
           fsanitizeflags=
 
         if test "x$fuzzer" = "xyes" && test "x$ax_cv_cc_clang" = "xyes"; then
-                fsanitizeflags="$fsanitizeflags,fuzzer"
+                fsanitizeflags="$fsanitizeflags,fuzzer-no-link"
   fi
 
         if test "x$coverage" = "xyes" && test "x$ax_cv_cc_clang" = "xyes"; then
@@ -15030,7 +15030,7 @@ fi
   if test "x$fsanitizeflags" != "x"; then
     fsanitizeflags="$(echo $fsanitizeflags | sed 's/^,*//')"
     devcflags="-fsanitize=$fsanitizeflags $devcflags"
-    devldflags="-fsanitize=$(echo $fsanitizeflags | sed 's/fuzzer/fuzzer-no-link/') $devldflags"
+    devldflags="-fsanitize=$fsanitizeflags $devldflags"
   fi
 
         devcflags="$(echo $devcflags | sed -e 's/\\t//g;s/  //g')"
index 75ac277e54b34c7bc63eaae8e7cd85921d2930ee..a85c8d4b4957e258d820db7c2540967ea1490f3e 100644 (file)
@@ -1845,7 +1845,7 @@ if test "x$developer" = "xyes"; then
     dnl #
     dnl #  -fsanitize=fuzzer  - Build with fuzzer support
     dnl #
-    fsanitizeflags="$fsanitizeflags,fuzzer"
+    fsanitizeflags="$fsanitizeflags,fuzzer-no-link"
   fi
 
   dnl #
@@ -1912,7 +1912,7 @@ if test "x$developer" = "xyes"; then
   if test "x$fsanitizeflags" != "x"; then
     fsanitizeflags="$(echo $fsanitizeflags | sed 's/^,*//')"
     devcflags="-fsanitize=$fsanitizeflags $devcflags"
-    devldflags="-fsanitize=$(echo $fsanitizeflags | sed 's/fuzzer/fuzzer-no-link/') $devldflags"
+    devldflags="-fsanitize=$fsanitizeflags $devldflags"
   fi
 
   dnl #
index 37f3218336363ab09f5112a528d708b2cda35561..08a9d96f93553d3e395712199f2776117b535877 100644 (file)
@@ -22,8 +22,9 @@ SOURCES                       := fuzzer.c
 
 TGT_PREREQS            := libfreeradius-$(PROTOCOL).a
 
+TGT_CFLAGS             := -fsanitize=fuzzer
+TGT_LDFLAGS            := -fsanitize=fuzzer
 TGT_LDLIBS             := $(LIBS)
-TGT_LDFLAGS    := -fsanitize=fuzzer
 
 FUZZER_CORPUS_DIR      := src/tests/fuzzer-corpus