summaryrefslogtreecommitdiffstats
path: root/tools/oss-fuzz.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-14 19:33:34 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-14 19:33:34 +0000
commit1272be04be0cb803eec87f602edb2e3e6f111aea (patch)
treebce17f6478cdd9f3c4ec3d751135dc42786d6a56 /tools/oss-fuzz.sh
parentReleasing progress-linux version 2.39.3-11~progress7.99u1. (diff)
downloadutil-linux-1272be04be0cb803eec87f602edb2e3e6f111aea.tar.xz
util-linux-1272be04be0cb803eec87f602edb2e3e6f111aea.zip
Merging upstream version 2.40.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tools/oss-fuzz.sh')
-rwxr-xr-xtools/oss-fuzz.sh11
1 files changed, 10 insertions, 1 deletions
diff --git a/tools/oss-fuzz.sh b/tools/oss-fuzz.sh
index 4aa7f23..c94a5f9 100755
--- a/tools/oss-fuzz.sh
+++ b/tools/oss-fuzz.sh
@@ -24,8 +24,17 @@ if [[ "$SANITIZER" == undefined ]]; then
CXXFLAGS+=" $UBSAN_FLAGS"
fi
+CONFIGURE_ARGS="--disable-all-programs --enable-libuuid --enable-libfdisk --enable-last --enable-fuzzing-engine --enable-libmount --enable-libblkid"
+
+LIBC_VERSION="$(dpkg -s libc6 | grep Version | cut -d' ' -f2)"
+
+# Ubuntu focal uses glibc 2.31 but 2.34 is necessary
+if dpkg --compare-versions "$LIBC_VERSION" 'lt' '2.34'; then
+ CONFIGURE_ARGS="$CONFIGURE_ARGS --disable-year2038"
+fi
+
./autogen.sh
-./configure --disable-all-programs --enable-libuuid --enable-libfdisk --enable-last --enable-fuzzing-engine --enable-libmount --enable-libblkid
+./configure $CONFIGURE_ARGS
make -j$(nproc) V=1 check-programs
for d in "$(dirname $0)"/../tests/ts/fuzzers/test_*_fuzz_files; do