Files
Fernando Apesteguía 271077d852 security/afl++: Update to 4.33c
ChangeLog: https://github.com/AFLplusplus/AFLplusplus/releases/tag/v4.33c

afl-fuzz:
 * Use AFL_PRELOAD_DISCRIMINATE_FORKSERVER_PARENT if you use AFL_PRELOAD
 * to disable fork, see docs (thanks to @alexandredoyen29)
 * Fix for FAST power schedules (introduced in 4.32c) (thanks to @kcwu)
 * Colors for NO_UI output (thanks to @smoelius)
 * Fix potential sync issues when resuming sessions and when instances in a
 * campaign are restarted and skip entries that were synced from itself
 * (thanks to @kcwu for raising the issues and providing support!)
 * Fix for when fast resuming failed
 * more 64 bit archicture support by @maribu
afl-cc:
 * Added instrumenting hidden edges (approx 5% edges were not instrumented,
 * LLVM sancov overall misses 8% of edges compared to our implementation)
 * Note that is is currently only implemented for our PCGUARD plugin, not
 * LTO, CLASSIC, etc.!
 * Fix to make AFL_SAN_NO_INST work with gcc_plugin
 * MacOS aflpp driver compilation fix (-fsanitize=fuzzer implementation)
 * Make AFL_DUMP_MAP_SIZE work even if the target has sanitizer issues
qemuafl:
 * Better MIPS persistent mode support
 * AFL_EXITPOINT support added
 * AFL_QEMU_BLOCK_COV block coverage support added
afl-cmin:
 * New afl-cmin.py which is much faster, will be executed by default via
 * afl-cmin if it executes successfully (thanks to @kcwu!)
 * Nyx mode now fully works for minimizing (with afl-cmin.py which is
 * called by afl-cmin if python is available) - before the map size was
 * fixed and so large targets lost coverage.
New desocketing library: utils/libaflppdesock
 * Likely works when all other desocketing options fail
nyx_mode:
 * Properly determine map size

Reported by:	portscout
2025-07-01 17:45:24 +02:00

83 lines
2.3 KiB
Makefile

PORTNAME= afl
DISTVERSIONPREFIX= v
DISTVERSION= 4.33c
CATEGORIES= security
PKGNAMESUFFIX= ++-${FLAVOR}
MAINTAINER= ports@FreeBSD.org
COMMENT= Fast instrumented fuzzer
WWW= https://aflplus.plus/
LICENSE= APACHE20
LICENSE_FILE= ${WRKSRC}/docs/COPYING
ONLY_FOR_ARCHS= aarch64 amd64 i386 powerpc powerpc64 powerpc64le riscv64
ONLY_FOR_ARCHS_REASON= uses x86-only instrumentation or requires complete LLVM support
BUILD_DEPENDS= ginstall:sysutils/coreutils
FLAVORS= llvm # gcc
FLAVOR?= ${FLAVORS:[1]}
USES= gmake shebangfix tar:tgz
.if ${FLAVOR} == llvm
USES+= llvm:build,run
.endif
.if ${FLAVOR} == gcc
USE_GCC= yes
.endif
USE_GITHUB= yes
GH_ACCOUNT= AFLplusplus
GH_PROJECT= AFLplusplus
SHEBANG_FILES= afl-persistent-config
MAKEFILE= GNUmakefile
MAKE_ARGS= ${${ARCH} != amd64 && ${ARCH} != i386:?AFL_NO_X86=1:} \
PREFIX="${PREFIX}/${PKGBASE}"
.if ${FLAVOR} == llvm
CFLAGS_riscv64= -mno-relax
MAKE_ARGS+= CC=clang${LLVM_VERSION} \
CXX=clang++${LLVM_VERSION} \
LLVM_CONFIG=llvm-config${LLVM_VERSION}
.endif
ALL_TARGET= distrib
QA_ENV= IGNORE_QA_stripped=1 # unstripped to keep it functional
DOCSDIR= ${PREFIX}/${PKGBASE}/share/doc/afl
MANDIRS= ${PREFIX}/${PKGBASE}/share/man/man8
BINARY_ALIAS= install=ginstall
PORTDOCS= *
OPTIONS_DEFINE= DEBUG DOCS PYTHON
OPTIONS_DEFAULT= PYTHON
PYTHON_DESC= Python mutators support
PYTHON_USES= gettext-runtime python
PYTHON_BINARY_ALIAS= python3-config=${PYTHON_CMD}-config \
python3=${PYTHON_CMD}
post-patch:
@${REINPLACE_CMD} '/alt_cc/ s,"gcc","gcc${GCC_DEFAULT:S/-devel$//}",' \
${WRKSRC}/src/afl-cc.c
.if ${FLAVOR} == gcc
@${REINPLACE_CMD} 's@\( as_params\[0\] = afl_as ? afl_as : \)\(.*\)@\1(u8*)"${LOCALBASE}/bin/as";@' \
${WRKSRC}/src/afl-as.c
.elif ${FLAVOR} == llvm
@${ECHO_CMD} "all:" >${WRKSRC}/GNUmakefile.gcc_plugin
.endif
post-install:
@${MKDIR} ${STAGEDIR}${PREFIX}/etc/man.d
@${ECHO_CMD} "MANPATH ${PREFIX}/${PKGBASE}/share/man" >${STAGEDIR}${PREFIX}/etc/man.d/${PKGBASE}.conf
@${ECHO_CMD} "etc/man.d/${PKGBASE}.conf" >>${TMPPLIST}
@cd ${STAGEDIR}${PREFIX}; \
${FIND} ${PKGBASE} -not -path '${PKGBASE}/share/doc/*' -and \( -type f -or -type l \) | \
${SED} -Ee 's,^afl\+\+-${FLAVOR}/share/man/.*,&.gz,' \
-e 's,^.*/afl-${${FLAVOR} == gcc:?(clang|llvm):(gcc|g\+\+)}.*,@comment &,' | \
${SORT} >> ${TMPPLIST}
@${CAT} ${TMPPLIST}
.include <bsd.port.mk>