gnunet-svn
[Top][All Lists]
Advanced

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

[libmicrohttpd] branch master updated (b452fc4b -> c310c029)


From: gnunet
Subject: [libmicrohttpd] branch master updated (b452fc4b -> c310c029)
Date: Sat, 19 Mar 2022 13:21:51 +0100

This is an automated email from the git hooks/post-receive script.

karlson2k pushed a change to branch master
in repository libmicrohttpd.

    from b452fc4b MHD_create_response_empty(): added new function
     new 38a504c9 configure: fixed compiler flags for UBSan
     new 1061dc30 configure: fixed order of compiler flags, fixed check
     new c310c029 configure: do not use sanitizers without run-time lib, unless 
explicitly requested

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 configure.ac | 110 ++++++++++++++++++++++++++++++++++-------------------------
 1 file changed, 64 insertions(+), 46 deletions(-)

diff --git a/configure.ac b/configure.ac
index 5a6400bb..8cced4e0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2919,11 +2919,14 @@ AS_UNSET([LSAN_OPTIONS])
 AC_MSG_CHECKING([whether to enable run-time sanitizers])
 AC_ARG_ENABLE([sanitizers],
   [AS_HELP_STRING([[--enable-sanitizers[=address,undefined,leak,user-poison]]],
-  [enable run-time sanitizers, specify the list of types of sanitizers to 
enable or ]
-  [leave the list empty to enable all suppoted and availabe sanitizers])],
+  [enable run-time sanitizers, specify the list of types of sanitizers to 
enable, ]
+  [leave the list empty (or set to "auto") to enable all suppoted and availabe 
]
+  [sanitizers, or specify "auto-fallback" to use sanitizers even without ]
+  [installed sanitizer run-time library])],
   [], [enable_sanitizers=no])
 AS_IF([test "x${enable_sanitizers}" = "x"], [enable_sanitizers="auto"])
 AS_VAR_IF([enable_sanitizers], ["yes"], [enable_sanitizers="auto"])
+AS_VAR_IF([enable_sanitizers], ["autofallback"], 
[enable_sanitizers="auto-fallback"])
 AS_IF([test "x${enable_sanitizers}" = "xno"],
   [
     enable_sanitizers="no"
@@ -2939,6 +2942,13 @@ AS_IF([test "x${enable_sanitizers}" = "xno"],
     enable_san_leak="auto"
     enable_san_upoison="auto"
   ],
+  [test "x${enable_sanitizers}" = "xauto-fallback"],
+  [
+    enable_san_address="auto"
+    enable_san_undef="auto-fallback"
+    enable_san_leak="auto"
+    enable_san_upoison="auto"
+  ],
   [
     AS_UNSET([san])
     enable_san_address="no"
@@ -2952,7 +2962,7 @@ AS_IF([test "x${enable_sanitizers}" = "xno"],
         [undefined], [enable_san_undef="yes"],
         [leak], [enable_san_leak="yes"],
         [user-poison|user_poison], [enable_san_upoison="yes"],
-        [no|yes|auto], [AC_MSG_ERROR(["$san" cannot be used with other options 
for --enable-sanitizers=])],
+        [no|yes|auto|auto-fallback|autofallback], [AC_MSG_ERROR(["$san" cannot 
be used with other options for --enable-sanitizers=])],
         [AC_MSG_ERROR([Unknown parameter "$san" for --enable-sanitizers=])]
       )
     done
@@ -2965,6 +2975,7 @@ AS_IF([test "x${enable_sanitizers}" = "xno"],
 AS_CASE([${enable_sanitizers}],
   [selected], [AC_MSG_RESULT([selected])],
   [auto], [AC_MSG_RESULT([yes, detect and use supported sanitizers])],
+  [auto-fallback], [AC_MSG_RESULT([yes, detect and use supported sanitizers 
even without run-time lib])],
   [AC_MSG_RESULT([no])]
 )
 AS_VAR_IF([enable_sanitizers], ["no"], [:],
@@ -3200,38 +3211,55 @@ int main(void)
                
enabled_sanitizers="${enabled_sanitizers}${enabled_sanitizers:+, }undefined"
              ],
              [
-               AC_CACHE_CHECK([for undefined behavior sanitizer with 
'-fsanitize-undefined-trap-on-error'], [mhd_cv_cc_sanitizer_undefined_trap],
-                 [
-                   CFLAGS="${CFLAGS_ac} ${san_FLAGS} ${san_CFLAGS} 
-fsanitize=undefined -fsanitize-undefined-trap-on-error ${user_CFLAGS}"
-                   AC_LINK_IFELSE([AC_LANG_SOURCE([${test_undf_prog}])],
-                    [mhd_cv_cc_sanitizer_undefined_trap=yes], 
[mhd_cv_cc_sanitizer_undefined_trap=no])
-                 ]
-               )
-               AS_VAR_IF([mhd_cv_cc_sanitizer_undefined_trap], ["yes"],
+               AS_CASE([${enable_san_undef}], [yes|auto-fallback],
                  [
-                   AX_APPEND_FLAG([-fsanitize=undefined], [san_FLAGS])
-                   AX_APPEND_FLAG([-fsanitize-undefined-trap-on-error], 
[san_FLAGS])
-                   
enabled_sanitizers="${enabled_sanitizers}${enabled_sanitizers:+, }undefined"
-                   AC_MSG_WARN([Enabled sanitizer without run-time library, 
error reporting will be limited])
-                 ],
-                 [
-                   AS_IF([test -z "${enabled_sanitizers}"],
+                   AC_CACHE_CHECK([for undefined behavior sanitizer with 
'-fsanitize-undefined-trap-on-error'], [mhd_cv_cc_sanitizer_undefined_trap],
+                     [
+                       CFLAGS="${CFLAGS_ac} ${san_FLAGS} ${san_CFLAGS} 
-fsanitize=undefined -fsanitize-undefined-trap-on-error ${user_CFLAGS}"
+                       AC_LINK_IFELSE([AC_LANG_SOURCE([${test_undf_prog}])],
+                        [mhd_cv_cc_sanitizer_undefined_trap=yes], 
[mhd_cv_cc_sanitizer_undefined_trap=no])
+                     ]
+                   )
+                   AS_VAR_IF([mhd_cv_cc_sanitizer_undefined_trap], ["yes"],
                      [
-                       # Last resort
-                       AC_CACHE_CHECK([for undefined behavior sanitizer with 
'-fsanitize-trap=all'], [mhd_cv_cc_sanitizer_undefined_trap_all],
+                       AX_APPEND_FLAG([-fsanitize=undefined], [san_FLAGS])
+                       AX_APPEND_FLAG([-fsanitize-undefined-trap-on-error], 
[san_FLAGS])
+                       
enabled_sanitizers="${enabled_sanitizers}${enabled_sanitizers:+, }undefined"
+                       AC_MSG_WARN([Enabled sanitizer without run-time 
library, error reporting will be limited])
+                     ],
+                     [
+                       AS_IF([test -z "${enabled_sanitizers}"],
                          [
-                           CFLAGS="${CFLAGS_ac} ${san_FLAGS} ${san_CFLAGS} 
-fsanitize=undefined -fsanitize-trap=all ${user_CFLAGS}"
-                           
AC_LINK_IFELSE([AC_LANG_SOURCE([${test_undf_prog}])],
-                            [mhd_cv_cc_sanitizer_undefined_trap_all=yes], 
[mhd_cv_cc_sanitizer_undefined_trap_all=no])
+                           # Last resort
+                           AC_CACHE_CHECK([for undefined behavior sanitizer 
with '-fsanitize-trap=all'], [mhd_cv_cc_sanitizer_undefined_trap_all],
+                             [
+                               CFLAGS="${CFLAGS_ac} ${san_FLAGS} ${san_CFLAGS} 
-fsanitize=undefined -fsanitize-trap=all ${user_CFLAGS}"
+                               
AC_LINK_IFELSE([AC_LANG_SOURCE([${test_undf_prog}])],
+                                [mhd_cv_cc_sanitizer_undefined_trap_all=yes], 
[mhd_cv_cc_sanitizer_undefined_trap_all=no])
+                             ]
+                           )
+                           
AS_VAR_IF([mhd_cv_cc_sanitizer_undefined_trap_all],["yes"],
+                             [
+                               AX_APPEND_FLAG([-fsanitize=undefined], 
[san_FLAGS])
+                               AX_APPEND_FLAG([-fsanitize-trap=all], 
[san_FLAGS])
+                               CFLAGS="${CFLAGS_ac} ${san_FLAGS} ${san_CFLAGS} 
-fsanitize=undefined -fsanitize-trap=all ${user_CFLAGS}"
+                               
enabled_sanitizers="${enabled_sanitizers}${enabled_sanitizers:+, }undefined"
+                               AC_MSG_WARN([Enabled sanitizer without run-time 
library, error reporting will be limited])
+                             ]
+                           )
                          ]
                        )
-                       
AS_VAR_IF([mhd_cv_cc_sanitizer_undefined_trap_all],["yes"],
+                     ]
+                   )
+                   AS_CASE(["$enabled_sanitizers"], [*undefined],
+                     [
+                       AS_VAR_IF([mhd_cv_cc_sanitizer_undefined], ["yes"],[],
                          [
-                           AX_APPEND_FLAG([-fsanitize=undefined], [san_FLAGS])
-                           AX_APPEND_FLAG([-fsanitize-trap=all], [san_FLAGS])
-                           CFLAGS="${CFLAGS_ac} ${san_FLAGS} ${san_CFLAGS} 
-fsanitize=undefined -fsanitize-trap=all ${user_CFLAGS}"
-                           
enabled_sanitizers="${enabled_sanitizers}${enabled_sanitizers:+, }undefined"
-                           AC_MSG_WARN([Enabled sanitizer without run-time 
library, error reporting will be limited])
+                           # A workaround for broken clang which is trying to 
use UBSan lib
+                           # even when instructed to not use it
+                           CFLAGS="${CFLAGS_ac} ${san_FLAGS} ${san_CFLAGS} 
${user_CFLAGS}"
+                           
AX_APPEND_LINK_FLAGS([-fsanitize-trap=implicit-conversion],
+                             [san_FLAGS], [], 
[AC_LANG_SOURCE([${test_undf_prog}])])
                          ]
                        )
                      ]
@@ -3242,15 +3270,6 @@ int main(void)
            )
            AS_CASE(["$enabled_sanitizers"], [*undefined],
              [
-               AS_VAR_IF([mhd_cv_cc_sanitizer_undefined], ["yes"],[],
-                 [
-                   # A workaround for broken clang which is trying to use 
UBSan lib
-                   # even when instructed to not use it
-                   CFLAGS="${CFLAGS_ac} ${san_FLAGS} ${san_CFLAGS} 
${user_CFLAGS}"
-                   AX_APPEND_LINK_FLAGS([-fsanitize-trap=implicit-conversion],
-                     [san_FLAGS], [], [AC_LANG_SOURCE([${test_undf_prog}])])
-                 ]
-               )
                CFLAGS="${CFLAGS_ac} ${san_FLAGS} ${san_CFLAGS} ${user_CFLAGS}"
                AX_APPEND_LINK_FLAGS([-fsanitize=bounds-strict 
-fsanitize=local-bounds -fsanitize=implicit-conversion 
-fsanitize=nullability-arg],
                  [san_CFLAGS], [], [AC_LANG_SOURCE([${test_undf_prog}])])
@@ -3312,14 +3331,13 @@ int main(void)
        )
        AS_VAR_IF([enable_san_address], ["yes"],
          [
-           AS_VAR_IF([mhd_cv_cc_sanitizer_address],["yes"],
-             [
-               AX_APPEND_FLAG([-D_FORTIFY_SOURCE=0], [san_CFLAGS])
-               CFLAGS="${CFLAGS_ac} ${san_FLAGS} ${san_CFLAGS} ${user_CFLAGS}"
-               AX_APPEND_COMPILE_FLAGS([-Wp,-U_FORTIFY_SOURCE], [san_CFLAGS])
-             ],
-             [AC_MSG_WARN([$CC does not support address sanitizer])]
-           )
+           CFLAGS="${CFLAGS_ac} ${san_FLAGS} ${san_CFLAGS} ${user_CFLAGS}"
+           AX_APPEND_COMPILE_FLAGS([-Wp,-U_FORTIFY_SOURCE], [san_CFLAGS])
+           AX_APPEND_FLAG([-D_FORTIFY_SOURCE=0], [san_CFLAGS])
+         ],
+         [
+           AS_CASE([$enable_sanitizers], [auto|auto-fallback],
+             [AC_MSG_WARN([$CC does not support address sanitizer])])
          ]
        )
        CFLAGS="${CFLAGS_ac} ${san_FLAGS} ${san_CFLAGS} ${user_CFLAGS}"

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]