]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Attempt to fix build failure in oss-fuzz
authorW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Wed, 8 May 2019 12:43:56 +0000 (14:43 +0200)
committerW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Wed, 8 May 2019 12:43:56 +0000 (14:43 +0200)
because of reallocarray.
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14648.
Does not omit compile flags from commandline.

configure
configure.ac
doc/Changelog

index 777649c666b40fd860d31128222ea2ce810fb1f2..86fe81293d147e1fb0a17462c59ba1c8ecdb4c93 100755 (executable)
--- a/configure
+++ b/configure
 
 
 
+if echo "$CFLAGS" | grep 'FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION' >/dev/null; then
+       :
+       # do not strip flags, so they are on the command line for fuzzer builds.
+       # because otherwise reallocarray looks like it can link in the
+       # configure test, but doesn't really link at link time.
+       # this is, by the way, safe for production, and keeps the
+       # commandline more explicitly with the compile defines for
+       # special compile settings.
+else
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: Stripping extension flags..." >&5
 $as_echo "$as_me: Stripping extension flags..." >&6;}
@@ -21165,6 +21174,7 @@ $as_echo "#define OMITTED__D_LARGEFILE_SOURCE_1 1" >>confdefs.h
   fi
 
 
+fi
 if test -n "$LATE_LDFLAGS"; then
   LDFLAGS="$LATE_LDFLAGS $LDFLAGS"
 fi
index abbecf0bad0b8ef4634cbcd0447f44cb2a5d56b3..c4f1231845ebaad18de576a97d8d661ecf24dedb 100644 (file)
@@ -1644,7 +1644,17 @@ fi
 AC_SUBST(ALLTARGET)
 AC_SUBST(INSTALLTARGET)
 
-ACX_STRIP_EXT_FLAGS
+if echo "$CFLAGS" | grep 'FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION' >/dev/null; then
+       :
+       # do not strip flags, so they are on the command line for fuzzer builds.
+       # because otherwise reallocarray looks like it can link in the
+       # configure test, but doesn't really link at link time.
+       # this is, by the way, safe for production, and keeps the
+       # commandline more explicitly with the compile defines for
+       # special compile settings.
+else
+       ACX_STRIP_EXT_FLAGS
+fi
 if test -n "$LATE_LDFLAGS"; then
   LDFLAGS="$LATE_LDFLAGS $LDFLAGS"
 fi
index aef303f2434e8877b6156c0911c5f1227520e9e1..82ed8db51c555dede540de652d4460a491b91759 100644 (file)
@@ -1,3 +1,8 @@
+8 May 2019: Wouter
+       - Attempt to fix build failure in oss-fuzz because of reallocarray.
+         https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14648.
+         Does not omit compile flags from commandline.
+
 7 May 2019: Wouter
        - Fix edns-subnet locks, in error cases the lock was not unlocked.
        - Fix doxygen output error on readme markdown vignettes.