diff --git a/.github/workflows/cifuzz.yml b/.github/workflows/cifuzz.yml index a567bbe6d..c883232f3 100644 --- a/.github/workflows/cifuzz.yml +++ b/.github/workflows/cifuzz.yml @@ -17,7 +17,7 @@ jobs: strategy: fail-fast: false matrix: - sanitizer: [address, undefined] + sanitizer: [address, undefined, memory] steps: - name: Build Fuzzers (${{ matrix.sanitizer }}) id: build diff --git a/.travis-functions.sh b/.travis-functions.sh index 9cdc2357f..ae7b683dd 100755 --- a/.travis-functions.sh +++ b/.travis-functions.sh @@ -256,6 +256,7 @@ function osx_install_script OSX_CONFOPTS=" --disable-ipcrm \ --disable-ipcs \ + --disable-libmount \ " # workaround: glibtoolize could not find sed diff --git a/configure.ac b/configure.ac index 97f404f92..4d357d9d5 100644 --- a/configure.ac +++ b/configure.ac @@ -694,69 +694,6 @@ AS_CASE([$enable_all_programs], AX_CHECK_TLS -AC_DEFUN([UL_SCANF_TYPE_MODIFIER], [dnl -# include -# include -int main() -{ - int i; - int rc = 1; - char *s; - i = sscanf("x", $1, &s); - if (i == 1 && *s == 'x') - rc = 0; - free(s); - return rc; -}]) - -AC_CACHE_VAL([scanf_cv_alloc_modifier], - AC_RUN_IFELSE([AC_LANG_SOURCE([UL_SCANF_TYPE_MODIFIER(["%ms"])])], - [scanf_cv_alloc_modifier=ms], - AC_RUN_IFELSE([AC_LANG_SOURCE([UL_SCANF_TYPE_MODIFIER(["%as"])])], - [scanf_cv_alloc_modifier=as], - [scanf_cv_alloc_modifier=no] - ) - , - - [AC_COMPILE_IFELSE([AC_LANG_SOURCE([ - #include - #include - - #if defined(__GLIBC__) && !defined(__UCLIBC__) - - #if !(__GLIBC_PREREQ(2, 7)) - #error %m is not available - #endif - - #elif defined(_POSIX_VERSION) - - #if _POSIX_VERSION < 200809L - #error %m is not available - #endif - - #else - #error Your C-library is not supported. - #endif - ])], - [scanf_cv_alloc_modifier=ms], - [scanf_cv_alloc_modifier=no])] - ) -) - -AC_MSG_CHECKING([scanf string alloc modifiers]) -AS_CASE([$scanf_cv_alloc_modifier], - [ms], - [AC_MSG_RESULT([(%ms) yes]) - AC_DEFINE([HAVE_SCANF_MS_MODIFIER], [1], [scanf %ms modifier]) - have_scanf_alloc_modifier=yes], - [as], - [AC_MSG_RESULT([(%as) yes]) - have_scanf_alloc_modifier=yes - AC_DEFINE([HAVE_SCANF_AS_MODIFIER], [1], [scanf %as modifier])], - [AC_MSG_RESULT([no]) - have_scanf_alloc_modifier=no] -) - have_pty=no AC_ARG_WITH([util], AS_HELP_STRING([--without-util], [compile without libutil]), [], [with_util=auto] @@ -1131,7 +1068,6 @@ AC_ARG_ENABLE([libmount], ) UL_BUILD_INIT([libmount]) UL_REQUIRES_BUILD([libmount], [libblkid]) -UL_REQUIRES_HAVE([libmount], [scanf_alloc_modifier], [scanf string alloc modifier]) UL_REQUIRES_HAVE([libmount], [dirfd,ddfd], [dirfd or ddfd function]) AM_CONDITIONAL([BUILD_LIBMOUNT], [test "x$build_libmount" = xyes]) AM_CONDITIONAL([BUILD_LIBMOUNT_TESTS], [test "x$build_libmount" = xyes -a "x$enable_static" = xyes]) diff --git a/include/c.h b/include/c.h index 64cf5c3fb..ae0813109 100644 --- a/include/c.h +++ b/include/c.h @@ -377,15 +377,6 @@ static inline int xusleep(useconds_t usec) exit(eval); \ }) -/* - * scanf modifiers for "strings allocation" - */ -#ifdef HAVE_SCANF_MS_MODIFIER -#define UL_SCNsA "%ms" -#elif defined(HAVE_SCANF_AS_MODIFIER) -#define UL_SCNsA "%as" -#endif - /* * seek stuff */