Index | Thread | Search

From:
Theo Buehler <tb@theobuehler.org>
Subject:
[update] afl++ to 4.32c, switch to llvm 19
To:
ports@openbsd.org, jasper@openbsd.org
Date:
Sat, 14 Jun 2025 11:01:35 +0200

Download raw body.

Thread
  • Theo Buehler:

    [update] afl++ to 4.32c, switch to llvm 19

afl++ will fail to build when we switch MODCLANG_VERSION 19 by default.
So update it and set MODCLANG_VERSION manually to 19 for now. afl-as
seems to be gone and disable the gcc module a bit more forcibly since
there's logic to pick up eg++ and there's risk of dpb junking fallout.

Works fine in a quick test.

Index: Makefile
===================================================================
RCS file: /cvs/ports/devel/afl++/Makefile,v
diff -u -p -r1.9 Makefile
--- Makefile	9 Feb 2024 13:23:31 -0000	1.9
+++ Makefile	14 Jun 2025 08:19:30 -0000
@@ -3,7 +3,7 @@ ONLY_FOR_ARCHS= i386 amd64
 COMMENT=	improved version of afl
 GH_ACCOUNT =	AFLplusplus
 GH_PROJECT =	AFLplusplus
-GH_TAGNAME =	v4.10c
+GH_TAGNAME =	v4.32c
 PKGNAME =	afl++-${GH_TAGNAME:S/v//}
 CATEGORIES=	devel
 
@@ -19,6 +19,7 @@ USE_GMAKE=		Yes
 MODULES =		lang/clang
 RUN_DEPENDS =		lang/gawk
 
+MODCLANG_VERSION =	19
 MAKE_FLAGS =		LLVM_CONFIG=llvm-config-${MODCLANG_VERSION} \
 			NO_PYTHON=1
 FAKE_FLAGS=		PREFIX="${TRUEPREFIX}"
Index: distinfo
===================================================================
RCS file: /cvs/ports/devel/afl++/distinfo,v
diff -u -p -r1.5 distinfo
--- distinfo	9 Feb 2024 13:23:31 -0000	1.5
+++ distinfo	14 Jun 2025 08:12:56 -0000
@@ -1,2 +1,2 @@
-SHA256 (AFLplusplus-4.10c.tar.gz) = yaQ4lLh1AqX2nv25fe5jfJ3U0sXf7xydebnUBq2v23Y=
-SIZE (AFLplusplus-4.10c.tar.gz) = 2955420
+SHA256 (AFLplusplus-4.32c.tar.gz) = 3H9ZoRzoz2ej7QmlrHgCjG95OyObIf2D5bI3DOoWaSY=
+SIZE (AFLplusplus-4.32c.tar.gz) = 3045679
Index: patches/patch-GNUmakefile
===================================================================
RCS file: /cvs/ports/devel/afl++/patches/patch-GNUmakefile,v
diff -u -p -r1.6 patch-GNUmakefile
--- patches/patch-GNUmakefile	9 Feb 2024 13:23:31 -0000	1.6
+++ patches/patch-GNUmakefile	14 Jun 2025 08:21:22 -0000
@@ -3,23 +3,31 @@ Index: GNUmakefile
 +++ GNUmakefile
 @@ -21,10 +21,10 @@ HASH=\#
  
- PREFIX     ?= /usr/local
- BIN_PATH    = $(PREFIX)/bin
--HELPER_PATH = $(PREFIX)/lib/afl
-+HELPER_PATH = $(PREFIX)/libexec/afl
- DOC_PATH    = $(PREFIX)/share/doc/afl
- MISC_PATH   = $(PREFIX)/share/afl
--MAN_PATH    = $(PREFIX)/share/man/man8
-+MAN_PATH    = $(PREFIX)/man/man8
+ PREFIX      ?= /usr/local
+ BIN_PATH     = $(PREFIX)/bin
+-HELPER_PATH  = $(PREFIX)/lib/afl
++HELPER_PATH  = $(PREFIX)/libexec/afl
+ DOC_PATH     = $(PREFIX)/share/doc/afl
+ MISC_PATH    = $(PREFIX)/share/afl
+-MAN_PATH     = $(PREFIX)/share/man/man8
++MAN_PATH     = $(PREFIX)/man/man8
+ INCLUDE_PATH = $(PREFIX)/include/afl
  
  PROGNAME    = afl
- VERSION     = $(shell grep '^$(HASH)define VERSION ' ../config.h | cut -d '"' -f2)
-@@ -319,7 +319,7 @@ ifdef TEST_MMAP
+@@ -332,7 +332,7 @@ ifdef TEST_MMAP
  endif
  
  .PHONY: all
--all:	test_x86 test_shm test_python ready $(PROGS) afl-as llvm gcc_plugin test_build all_done
-+all:	test_x86 test_shm test_python ready $(PROGS) afl-as llvm
+-all:	test_x86 test_shm test_python ready $(PROGS) llvm gcc_plugin test_build all_done
++all:	test_x86 test_shm test_python ready $(PROGS) llvm
  	-$(MAKE) -C utils/aflpp_driver
  	@echo
  	@echo
+@@ -698,7 +698,6 @@ endif
+ distrib: all
+ 	-$(MAKE) -j$(nproc) -f GNUmakefile.llvm
+ ifneq "$(SYS)" "Darwin"
+-	-$(MAKE) -f GNUmakefile.gcc_plugin
+ 	-$(MAKE) -C utils/libdislocator
+ 	-$(MAKE) -C utils/libtokencap
+ endif
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.2 patch-utils_aflpp_driver_aflpp_driver_c
--- patches/patch-utils_aflpp_driver_aflpp_driver_c	9 Nov 2023 12:03:45 -0000	1.2
+++ patches/patch-utils_aflpp_driver_aflpp_driver_c	14 Jun 2025 08:17:03 -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
-@@ -231,7 +231,9 @@ static int ExecuteFilesOnyByOne(int argc, char **argv,
+@@ -236,7 +236,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.5 PLIST
--- pkg/PLIST	9 Feb 2024 13:23:31 -0000	1.5
+++ pkg/PLIST	14 Jun 2025 08:23:16 -0000
@@ -24,10 +24,35 @@ bin/afl-plot
 bin/afl-system-config
 @bin bin/afl-tmin
 bin/afl-whatsup
+include/afl/
+include/afl/afl-fuzz.h
+include/afl/afl-mutations.h
+include/afl/afl-persistent-replay.h
+include/afl/afl-prealloc.h
+include/afl/afl-record-compat.h
+include/afl/alloc-inl.h
+include/afl/android-ashmem.h
+include/afl/cmplog.h
+include/afl/common.h
+include/afl/config.h
+include/afl/coverage-32.h
+include/afl/coverage-64.h
+include/afl/debug.h
+include/afl/envs.h
+include/afl/forkserver.h
+include/afl/hash.h
+include/afl/list.h
+include/afl/sharedmem.h
+include/afl/snapshot-inl.h
+include/afl/t1ha.h
+include/afl/t1ha0_ia32aes_b.h
+include/afl/t1ha_bits.h
+include/afl/t1ha_selfcheck.h
+include/afl/types.h
+include/afl/xxhash.h
 libexec/afl/
 @so libexec/afl/SanitizerCoverageLTO.so
 @so libexec/afl/SanitizerCoveragePCGUARD.so
-@bin libexec/afl/afl-as
 libexec/afl/afl-compiler-rt-32.o
 libexec/afl/afl-compiler-rt-64.o
 libexec/afl/afl-compiler-rt.o
@@ -37,7 +62,6 @@ libexec/afl/afl-compiler-rt.o
 libexec/afl/afl-llvm-rt-lto-32.o
 libexec/afl/afl-llvm-rt-lto-64.o
 libexec/afl/afl-llvm-rt-lto.o
-libexec/afl/as
 @so libexec/afl/cmplog-instructions-pass.so
 @so libexec/afl/cmplog-routines-pass.so
 @so libexec/afl/cmplog-switches-pass.so
@@ -50,7 +74,6 @@ libexec/afl/dynamic_list.txt
 @so libexec/afl/split-switches-pass.so
 @man man/man8/afl-addseeds.8
 @man man/man8/afl-analyze.8
-@man man/man8/afl-as.8
 @man man/man8/afl-c++.8
 @man man/man8/afl-cc.8
 @man man/man8/afl-clang-fast++.8
@@ -105,6 +128,7 @@ share/afl/dictionaries/jpeg2000.dict
 share/afl/dictionaries/js.dict
 share/afl/dictionaries/json.dict
 share/afl/dictionaries/jsonnet.dict
+share/afl/dictionaries/jsonschema.dict
 share/afl/dictionaries/markdown.dict
 share/afl/dictionaries/math.dict
 share/afl/dictionaries/mathml.dict
@@ -127,6 +151,7 @@ share/afl/dictionaries/riff.dict
 share/afl/dictionaries/rss.dict
 share/afl/dictionaries/rst.dict
 share/afl/dictionaries/rtf.dict
+share/afl/dictionaries/ruby.dict
 share/afl/dictionaries/sas.dict
 share/afl/dictionaries/spss.dict
 share/afl/dictionaries/sql.dict
@@ -254,6 +279,7 @@ share/doc/afl/README.llvm.md
 share/doc/afl/README.lto.md
 share/doc/afl/README.md
 share/doc/afl/README.persistent_mode.md
+share/doc/afl/SAND.md
 share/doc/afl/afl-fuzz_approach.md
 share/doc/afl/best_practices.md
 share/doc/afl/custom_mutators.md