From: Theo Buehler Subject: [llvm22] afl++ 4.40c (wip) To: ports@openbsd.org Cc: jasper@openbsd.org Date: Mon, 8 Jun 2026 22:12:16 +0200 This straightforward update builds with llvm22 and kind of works with the caveat that you need to pass LDFLAGS=-lexecinfo to afl-cc and friends. This can be solved with wrapper scripts but it would be nice if there was a better solution... Index: Makefile =================================================================== RCS file: /cvs/ports/devel/afl++/Makefile,v diff -u -p -r1.14 Makefile --- Makefile 2 Jun 2026 17:47:05 -0000 1.14 +++ Makefile 8 Jun 2026 19:21:44 -0000 @@ -14,7 +14,7 @@ MAINTAINER= Jasper Lievisse Adriaanse /dev/null || date -u -r "$(SOURCE_DATE_EPOCH)" "+%Y-%m-%d" 2>/dev/null || date -u "+%Y-%m-%d") - Index: patches/patch-afl-cmin =================================================================== RCS file: /cvs/ports/devel/afl++/patches/patch-afl-cmin,v diff -u -p -r1.3 patch-afl-cmin --- patches/patch-afl-cmin 9 Feb 2024 13:23:31 -0000 1.3 +++ patches/patch-afl-cmin 8 Jun 2026 19:21:44 -0000 @@ -1,19 +1,19 @@ - d822181467ec41f1ee2d840c3c5b1918c72ffc86 introduced a bunch of gawk-isms. - nproc doesn't exist on OpenBSD -Index: afl-cmin ---- afl-cmin.orig -+++ afl-cmin -@@ -8,7 +8,7 @@ export AFL_QUIET=1 +Index: afl-cmin.awk +--- afl-cmin.awk.orig ++++ afl-cmin.awk +@@ -10,7 +10,7 @@ test "$SYS" = "Darwin" && { + export AFL_QUIET=1 export ASAN_OPTIONS=detect_leaks=0 - THISPATH=`dirname ${0}` export PATH="${THISPATH}:$PATH" -awk -f - -- ${@+"$@"} <<'EOF' +gawk -f - -- ${@+"$@"} <<'EOF' #!/usr/bin/awk -f # awk script to minimize a test corpus of input files # -@@ -373,7 +373,7 @@ BEGIN { +@@ -377,7 +377,7 @@ BEGIN { } if (threads) { Index: patches/patch-utils_aflpp_driver_aflpp_driver_c =================================================================== RCS file: /cvs/ports/devel/afl++/patches/patch-utils_aflpp_driver_aflpp_driver_c,v diff -u -p -r1.3 patch-utils_aflpp_driver_aflpp_driver_c --- patches/patch-utils_aflpp_driver_aflpp_driver_c 17 Jun 2025 07:07:05 -0000 1.3 +++ patches/patch-utils_aflpp_driver_aflpp_driver_c 8 Jun 2026 19:21:44 -0000 @@ -1,7 +1,7 @@ Index: utils/aflpp_driver/aflpp_driver.c --- utils/aflpp_driver/aflpp_driver.c.orig +++ utils/aflpp_driver/aflpp_driver.c -@@ -236,7 +236,9 @@ static int ExecuteFilesOnyByOne(int argc, char **argv, +@@ -269,7 +269,9 @@ static int ExecuteFilesOnyByOne(int argc, char **argv, if (fd == -1) { continue; } Index: pkg/PLIST =================================================================== RCS file: /cvs/ports/devel/afl++/pkg/PLIST,v diff -u -p -r1.6 PLIST --- pkg/PLIST 17 Jun 2025 07:07:05 -0000 1.6 +++ pkg/PLIST 8 Jun 2026 19:21:44 -0000 @@ -10,7 +10,9 @@ bin/afl-clang-fast++ bin/afl-clang-lto bin/afl-clang-lto++ bin/afl-cmin +bin/afl-cmin.awk bin/afl-cmin.bash +bin/afl-cmin.py @bin bin/afl-fuzz bin/afl-g++ bin/afl-gcc @@ -26,6 +28,7 @@ bin/afl-system-config bin/afl-whatsup include/afl/ include/afl/afl-fuzz.h +include/afl/afl-ijon-min.h include/afl/afl-mutations.h include/afl/afl-persistent-replay.h include/afl/afl-prealloc.h @@ -57,6 +60,7 @@ libexec/afl/afl-compiler-rt-32.o libexec/afl/afl-compiler-rt-64.o libexec/afl/afl-compiler-rt.o @so libexec/afl/afl-llvm-dict2file.so +@so libexec/afl/afl-llvm-ijon-pass.so @so libexec/afl/afl-llvm-lto-instrumentlist.so @so libexec/afl/afl-llvm-pass.so libexec/afl/afl-llvm-rt-lto-32.o @@ -81,7 +85,9 @@ libexec/afl/dynamic_list.txt @man man/man8/afl-clang-lto++.8 @man man/man8/afl-clang-lto.8 @man man/man8/afl-cmin.8 +@man man/man8/afl-cmin.awk.8 @man man/man8/afl-cmin.bash.8 +@man man/man8/afl-cmin.py.8 @man man/man8/afl-fuzz.8 @man man/man8/afl-gotcpu.8 @man man/man8/afl-lto++.8 @@ -156,6 +162,7 @@ share/afl/dictionaries/sas.dict share/afl/dictionaries/spss.dict share/afl/dictionaries/sql.dict share/afl/dictionaries/stata.dict +share/afl/dictionaries/stl.dict share/afl/dictionaries/svg.dict share/afl/dictionaries/tex.dict share/afl/dictionaries/theme-load-fuzz.dict @@ -269,6 +276,8 @@ share/afl/testcases/others/xml/small_doc share/doc/afl/ share/doc/afl/Changelog.md share/doc/afl/FAQ.md +share/doc/afl/FrameShift.md +share/doc/afl/IJON.md share/doc/afl/INSTALL.md share/doc/afl/README.cmplog.md share/doc/afl/README.gcc_plugin.md @@ -287,7 +296,6 @@ share/doc/afl/env_variables.md share/doc/afl/features.md share/doc/afl/fuzzing_binary-only_targets.md share/doc/afl/fuzzing_in_depth.md -share/doc/afl/ideas.md share/doc/afl/important_changes.md share/doc/afl/rpc_statsd.md share/doc/afl/third_party_tools.md