FreeBSD Bugzilla – Attachment 167092 Details for
Bug 207236
security/afl: Update to 2.02b
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
afl.diff
afl.diff (text/plain), 7.46 KB, created by
Tobias Kortkamp
on 2016-02-16 20:06:33 UTC
(
hide
)
Description:
afl.diff
Filename:
MIME Type:
Creator:
Tobias Kortkamp
Created:
2016-02-16 20:06:33 UTC
Size:
7.46 KB
patch
obsolete
>Index: Makefile >=================================================================== >--- Makefile (revision 408961) >+++ Makefile (working copy) >@@ -2,7 +2,7 @@ > # $FreeBSD$ > > PORTNAME= afl >-PORTVERSION= 1.96b >+PORTVERSION= 2.01b > CATEGORIES= security > MASTER_SITES= http://lcamtuf.coredump.cx/afl/releases/ > >@@ -12,48 +12,66 @@ > LICENSE= APACHE20 > LICENSE_FILE= ${WRKSRC}/docs/COPYING > >-USES= compiler gmake tar:tgz >+USES= compiler gmake tar:tgz > >-OPTIONS_DEFINE= DEBUG DOCS MINIMIZE_CORPUS PLOT_SUPPORT TEST_INSTRUMENTATION >+OPTIONS_DEFINE= DEBUG DOCS MINIMIZE_CORPUS LLVM TEST_INSTRUMENTATION > MINIMIZE_CORPUS_DESC= Install afl-cmin. Adds bash dependency >-PLOT_SUPPORT_DESC= Support progress plotting. Adds Gnuplot dependency > TEST_INSTRUMENTATION_DESC= Execute tests (expected to fail in jails) >-OPTIONS_DEFAULT= DOCS MINIMIZE_CORPUS PLOT_SUPPORT >+LLVM_DESC= LLVM-based instrumentation (broken on 9.x) >+OPTIONS_DEFAULT= DOCS LLVM MINIMIZE_CORPUS > > OPTIONS_SUB= yes > >-PORTSCOUT= ignore:1 >- >-ONLY_FOR_ARCHS= amd64 i386 >+ONLY_FOR_ARCHS= amd64 i386 > ONLY_FOR_ARCHS_REASON= Uses binary instrumentation > >-.include <bsd.port.pre.mk> >+LLVM_BUILD_DEPENDS= clang37:${PORTSDIR}/devel/llvm37 >+LLVM_RUN_DEPENDS= clang37:${PORTSDIR}/devel/llvm37 >+MINIMIZE_CORPUS_RUN_DEPENDS= ${LOCALBASE}/bin/bash:${PORTSDIR}/shells/bash > >-.if (${COMPILER_TYPE} == "clang" && ${ARCH} == "i386") >+.include <bsd.port.options.mk> >+ >+.if ${OSVERSION} < 1000013 >+# Broken on FreeBSD 9 >+PLIST_SUB+= LLVM_SUB="@comment " >+.else >+PLIST_SUB+= LLVM_SUB="" >+.endif >+ >+.if ${ARCH} == "i386" > # Clang i386 emits .cfi_sections which base as(1) doesn't understand >-BUILD_DEPENDS += ${LOCALBASE}/bin/as:${PORTSDIR}/devel/binutils >-RUN_DEPENDS += ${LOCALBASE}/bin/as:${PORTSDIR}/devel/binutils >+BUILD_DEPENDS+= ${LOCALBASE}/bin/as:${PORTSDIR}/devel/binutils >+RUN_DEPENDS+= ${LOCALBASE}/bin/as:${PORTSDIR}/devel/binutils > .endif > >-MINIMIZE_CORPUS_RUN_DEPENDS= ${LOCALBASE}/bin/bash:${PORTSDIR}/shells/bash >-PLOT_SUPORT_RUN_DEPENDS= gnuplot:${PORTSDIR}/math/gnuplot >+MAKE_ARGS= INSTALL_PROGRAM="${INSTALL_PROGRAM}" \ >+ INSTALL_SCRIPT="${INSTALL_SCRIPT}" > >-post-patch: >-.if ! ${PORT_OPTIONS:MTEST_INSTRUMENTATION} >+post-patch-TEST_INSTRUMENTATION-off: > # afl needs shmget() which usually isn't available in jails. Disabling > # the instrumentation tests makes sure building packages in jails works > # by default anyway. > ${REINPLACE_CMD} -e 's@^\(all.*\) test_build@\1@' ${WRKSRC}/Makefile >-.endif >- ${REINPLACE_CMD} -E -e 's@ -O3@@; s@ -g@@' \ >- -e 's@install -m 755@${INSTALL_PROGRAM}@' \ >- -e 's@ afl-(cmin|plot|whatsup) @ @g' \ >- ${WRKSRC}/Makefile >-.if (${COMPILER_TYPE} == "clang" && ${ARCH} == "i386") >+ ${REINPLACE_CMD} -e 's@^\(all.*\) test_build@\1@' ${WRKSRC}/llvm_mode/Makefile >+ >+post-patch: >+.if ${ARCH} == "i386" > ${REINPLACE_CMD} -e 's@\( as_params\[0\] = afl_as ? afl_as : \)\(.*\)@\1(u8*)"${LOCALBASE}/bin/as";@' \ > ${WRKSRC}/afl-as.c > .endif > >+.if ! ${OSVERSION} < 1000013 >+# Broken on FreeBSD 9 >+post-build-LLVM-on: >+ @(cd ${WRKSRC}/llvm_mode; ${SETENV} \ >+ CC=clang37 \ >+ CXX=clang++37 \ >+ LLVM_CONFIG=llvm-config37 \ >+ CFLAGS="${CFLAGS}" \ >+ CXXFLAGS="${CXXFLAGS}" \ >+ ${GMAKE}) >+.endif >+ > post-install: > ${INSTALL_DATA} ${WRKSRC}/docs/COPYING ${STAGEDIR}${DOCSDIR}/ > >@@ -64,4 +82,4 @@ > post-install-MINIMIZE_CORPUS-on: > ${INSTALL_SCRIPT} ${WRKSRC}/afl-cmin ${STAGEDIR}${PREFIX}/bin/ > >-.include <bsd.port.post.mk> >+.include <bsd.port.mk> >Index: distinfo >=================================================================== >--- distinfo (revision 408961) >+++ distinfo (working copy) >@@ -1,2 +1,2 @@ >-SHA256 (afl-1.96b.tgz) = 03beb06f8993dcb37d348e53da19ca9d064c83fcedc9d87b0b506c73c310f27c >-SIZE (afl-1.96b.tgz) = 804864 >+SHA256 (afl-2.01b.tgz) = 2a92285ee23b2d60ca408724c719a2e66f21600cf061b3b291b2b6933455ca40 >+SIZE (afl-2.01b.tgz) = 809639 >Index: files/patch-Makefile >=================================================================== >--- files/patch-Makefile (nonexistent) >+++ files/patch-Makefile (working copy) >@@ -0,0 +1,29 @@ >+--- Makefile.orig 2016-02-16 07:14:22 UTC >++++ Makefile >+@@ -21,6 +21,8 @@ BIN_PATH = $(PREFIX)/bin >+ HELPER_PATH = $(PREFIX)/lib/afl >+ DOC_PATH = $(PREFIX)/share/doc/afl >+ MISC_PATH = $(PREFIX)/share/afl >++INSTALL_PROGRAM?= install -s -m755 >++INSTALL_SCRIPT?= isntall -m755 >+ >+ PROGS = afl-gcc afl-fuzz afl-showmap afl-tmin afl-gotcpu afl-analyze >+ SH_PROGS = afl-plot afl-cmin afl-whatsup >+@@ -115,12 +117,13 @@ clean: >+ install: all >+ mkdir -p -m 755 $${DESTDIR}$(BIN_PATH) $${DESTDIR}$(HELPER_PATH) $${DESTDIR}$(DOC_PATH) $${DESTDIR}$(MISC_PATH) >+ rm -f $${DESTDIR}$(BIN_PATH)/afl-plot.sh >+- install -m 755 $(PROGS) $(SH_PROGS) $${DESTDIR}$(BIN_PATH) >++ ${INSTALL_PROGRAM} $(PROGS) $${DESTDIR}$(BIN_PATH) >++ ${INSTALL_SCRIPT} $(SH_PROGS) $${DESTDIR}$(BIN_PATH) >+ rm -f $${DESTDIR}$(BIN_PATH)/afl-as >+- if [ -f afl-qemu-trace ]; then install -m 755 afl-qemu-trace $${DESTDIR}$(BIN_PATH); fi >+- if [ -f afl-clang-fast -a -f afl-llvm-pass.so -a -f afl-llvm-rt.o ]; then set -e; install -m 755 afl-clang-fast $${DESTDIR}$(BIN_PATH); ln -sf afl-clang-fast $${DESTDIR}$(BIN_PATH)/afl-clang-fast++; install -m 755 afl-llvm-pass.so afl-llvm-rt.o $${DESTDIR}$(HELPER_PATH); fi >++ if [ -f afl-qemu-trace ]; then ${INSTALL_PROGRAM} afl-qemu-trace $${DESTDIR}$(BIN_PATH); fi >++ if [ -f afl-clang-fast -a -f afl-llvm-pass.so -a -f afl-llvm-rt.o ]; then set -e; ${INSTALL_PROGRAM} afl-clang-fast $${DESTDIR}$(BIN_PATH); ln -sf afl-clang-fast $${DESTDIR}$(BIN_PATH)/afl-clang-fast++; ${INSTALL_PROGRAM} afl-llvm-pass.so $${DESTDIR}$(HELPER_PATH); install -m 755 afl-llvm-rt.o $${DESTDIR}$(HELPER_PATH); fi >+ set -e; for i in afl-g++ afl-clang afl-clang++; do ln -sf afl-gcc $${DESTDIR}$(BIN_PATH)/$$i; done >+- install -m 755 afl-as $${DESTDIR}$(HELPER_PATH) >++ ${INSTALL_PROGRAM} afl-as $${DESTDIR}$(HELPER_PATH) >+ ln -sf afl-as $${DESTDIR}$(HELPER_PATH)/as >+ install -m 644 docs/README docs/ChangeLog docs/*.txt $${DESTDIR}$(DOC_PATH) >+ cp -r testcases/ $${DESTDIR}$(MISC_PATH) >Index: files/patch-llvm__mode_afl-clang-fast.c >=================================================================== >--- files/patch-llvm__mode_afl-clang-fast.c (nonexistent) >+++ files/patch-llvm__mode_afl-clang-fast.c (working copy) >@@ -0,0 +1,15 @@ >+--- llvm_mode/afl-clang-fast.c.orig 2015-09-08 22:37:25 UTC >++++ llvm_mode/afl-clang-fast.c >+@@ -106,10 +106,10 @@ static void edit_params(u32 argc, char** >+ >+ if (!strcmp(name, "afl-clang-fast++")) { >+ u8* alt_cxx = getenv("AFL_CXX"); >+- cc_params[0] = alt_cxx ? alt_cxx : (u8*)"clang++"; >++ cc_params[0] = alt_cxx ? alt_cxx : (u8*)"clang++37"; >+ } else { >+ u8* alt_cc = getenv("AFL_CC"); >+- cc_params[0] = alt_cc ? alt_cc : (u8*)"clang"; >++ cc_params[0] = alt_cc ? alt_cc : (u8*)"clang37"; >+ } >+ >+ cc_params[cc_par_cnt++] = "-Xclang"; >Index: pkg-message >=================================================================== >--- pkg-message (nonexistent) >+++ pkg-message (working copy) >@@ -0,0 +1 @@ >+If you want to use afl-plot also install math/gnuplot. >Index: pkg-plist >=================================================================== >--- pkg-plist (revision 408961) >+++ pkg-plist (working copy) >@@ -1,11 +1,16 @@ >+bin/afl-analyze > bin/afl-clang > bin/afl-clang++ >+%%LLVM_SUB%%%%LLVM%%bin/afl-clang-fast >+%%LLVM_SUB%%%%LLVM%%bin/afl-clang-fast++ >+%%LLVM_SUB%%%%LLVM%%lib/afl/afl-llvm-pass.so >+%%LLVM_SUB%%%%LLVM%%lib/afl/afl-llvm-rt.o > %%MINIMIZE_CORPUS%%bin/afl-cmin > bin/afl-fuzz > bin/afl-g++ > bin/afl-gcc > bin/afl-gotcpu >-%%PLOT_SUPPORT%%bin/afl-plot >+bin/afl-plot > bin/afl-showmap > bin/afl-tmin > bin/afl-whatsup
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
tobik
:
maintainer-approval+
Actions:
View
|
Diff
Attachments on
bug 207236
:
167059
|
167060
|
167061
|
167092
|
167093
|
167094
|
167128
|
167129
|
167130