From owner-freebsd-ports@FreeBSD.ORG Fri Nov 21 15:04:08 2014 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3414F590 for ; Fri, 21 Nov 2014 15:04:08 +0000 (UTC) Received: from vfemail.net (nine.vfemail.net [108.76.175.9]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 912F7C29 for ; Fri, 21 Nov 2014 15:04:07 +0000 (UTC) Received: (qmail 14432 invoked by uid 89); 21 Nov 2014 15:03:58 -0000 Received: from localhost (HELO freequeue.vfemail.net) (127.0.0.1) by localhost with (DHE-RSA-AES256-SHA encrypted) SMTP; 21 Nov 2014 15:03:57 -0000 Received: (qmail 14406 invoked by uid 89); 21 Nov 2014 15:03:34 -0000 Received: by simscan 1.3.1 ppid: 14402, pid: 14404, t: 0.0087s scanners:none Received: from unknown (HELO smtp102-2.vfemail.net) (172.16.100.62) by FreeQueue with SMTP; 21 Nov 2014 15:03:34 -0000 Received: (qmail 6711 invoked by uid 89); 21 Nov 2014 15:03:34 -0000 Received: by simscan 1.4.0 ppid: 6553, pid: 6701, t: 2.0056s scanners:none Received: from unknown (HELO nil) (amJlaWNoQHZmZW1haWwubmV0@172.16.100.27) by 172.16.100.62 with ESMTPA; 21 Nov 2014 15:03:32 -0000 From: Jan Beich To: Fabian Keil Subject: Re: Request for (i386) testing: american fuzzy lop References: <3dc1c153.7b7b9177@fabiankeil.de> <546DF8A5.3060601@gmail.com> <3fb914c3.1002708a@fabiankeil.de> <1557502e.1751489a@fabiankeil.de> Date: Fri, 21 Nov 2014 16:02:24 +0100 In-Reply-To: <1557502e.1751489a@fabiankeil.de> (Fabian Keil's message of "Fri, 21 Nov 2014 11:51:08 +0100") Message-ID: MIME-Version: 1.0 Content-Type: text/plain Cc: freebsd-ports@freebsd.org X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Nov 2014 15:04:08 -0000 Fabian Keil writes: >> [*] Testing the CC wrapper and instrumentation output... >> AFL_QUIET=1 AFL_INST_RATIO=100 AFL_PATH=. ./afl-clang -O2 -pipe >> -fstack-protector -fno-strict-aliasing -Wall -D_FORTIFY_SOURCE=2 >> -Wno-pointer-sign -DAFL_PATH=\"/prefix/afl-0.60b/lib/afl\" >> -DDOC_PATH=\"/prefix/afl-0.60b/share/doc/afl\" -DVERSION=\"0.60b\" >> -Wno-format test-instr.c -o test-instr >> /tmp/.afl-19244-1416499444.s: Assembler messages: >> /tmp/.afl-19244-1416499444.s:222: Error: unknown pseudo-op: `.cfi_sections' >> clang: error: assembler command failed with exit code 1 (use -v to >> see invocation) > > I updated the port to (hopefully) use as from ports on i386: > http://www.fabiankeil.de/sourcecode/freebsd/afl-61b.shar > > Does this make a difference? Maybe, if you want to force devel/binutils on 9.x users. It'd be nice to debug why clang misbehaves. Anyway, this version has wrong checksum. => afl-0.61b.tgz doesn't seem to exist in /portdistfiles/. => Attempting to fetch http://lcamtuf.coredump.cx/afl/releases/afl-0.61b.tgz fetch: http://lcamtuf.coredump.cx/afl/releases/afl-0.61b.tgz: size mismatch: expected 678088, actual 678234 After fixing I've tested on 11.0C i386, 10.1R i386, 10.0R amd64, 9.3R i386, 9.1R i386, 8.4R amd64 + tainted host on 11.0C amd64. For one, 8.x exhibit another old GNU as(1) issue: [*] Testing the CC wrapper and instrumentation output... AFL_QUIET=1 AFL_INST_RATIO=100 AFL_PATH=. ./afl-gcc -O2 -pipe -fstack-protector -fno-strict-aliasing -Wall -D_FORTIFY_SOURCE=2 -Wno-pointer-sign -DAFL_PATH=\"/prefix/afl-0.61b/lib/afl\" -DDOC_PATH=\"/prefix/afl-0.61b/share/doc/afl\" -DVERSION=\"0.61b\" -Wno-format test-instr.c -o test-instr /tmp/.afl-16870-1416574405.s: Assembler messages: /tmp/.afl-16870-1416574405.s:572: Error: suffix or operands invalid for `lahf' /tmp/.afl-16870-1416574405.s:593: Error: suffix or operands invalid for `sahf' Makefile:65: recipe for target 'test_build' failed > +.if ${ARCH} == "i386" > +BUILD_DEPENDS += ${LOCALBASE}/bin/as:${PORTSDIR}/devel/binutils > +.endif [...] > +.if ${ARCH} == "i386" > + ${REINPLACE_CMD} -e 's@\( as_params\[0\] = "\)@\1${LOCALBASE}/bin/@' \ > + ${WRKSRC}/afl-as.c > +.endif If ${LOCALBASE}/bin/as maybe called after install then you have to adjust RUN_DEPENDS. Keep in mind package-only users. > > If not, I'll probably just submit the port marked as broken > for i386 and try to get this working later on. > > Fabian A passing by committer may also complain about PORTVERSION vs. DISTVERSION, lack of LICENSE and DATADIR in pkg-plist. diff --git security/afl/Makefile security/afl/Makefile index e197507..db31853 100644 --- security/afl/Makefile +++ security/afl/Makefile @@ -9,7 +9,7 @@ MASTER_SITES= http://lcamtuf.coredump.cx/afl/releases/ MAINTAINER= fk@fabiankeil.de COMMENT= Fast instrumented fuzzer -USES= gmake tar:tgz +USES= compiler gmake tar:tgz OPTIONS_DEFINE= DEBUG DOCS TEST_INSTRUMENTATION TEST_INSTRUMENTATION_DESC= Execute tests expected to fail in jails @@ -18,10 +18,14 @@ OPTIONS_DEFAULT= DOCS ONLY_FOR_ARCHS= amd64 i386 ONLY_FOR_ARCHS_REASON= Uses binary instrumentation -.include +# XXX replace with bsd.port.options.mk once 8.4-RELEASE is EOL +# COMPILER_TYPE is defined in .pre without /usr/share/mk/bsd.compiler.mk +.include -.if ${ARCH} == "i386" +.if (${COMPILER_TYPE} == "clang" && ${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 .endif post-patch: @@ -32,16 +36,21 @@ post-patch: ${REINPLACE_CMD} -e 's@^\(all.*\) test_build@\1@' ${WRKSRC}/Makefile .endif ${REINPLACE_CMD} -e 's@ -O3@@; s@ -g@@' \ - -e 's/install -m 755/${INSTALL_PROGRAM}/' \ + -e 's@install -m 755@${INSTALL_PROGRAM}@' \ ${WRKSRC}/Makefile -.if ${ARCH} == "i386" +.if (${COMPILER_TYPE} == "clang" && ${ARCH} == "i386") ${REINPLACE_CMD} -e 's@\( as_params\[0\] = "\)@\1${LOCALBASE}/bin/@' \ ${WRKSRC}/afl-as.c .endif +# XXX remove once 8.4-RELEASE is EOL +# GNU as 2.15 doesn't understand lahf/sahf on amd64 + ${REINPLACE_CMD} -e 's@ifdef.*\(__OpenBSD__\)@if defined(\1) || \ + (defined(__FreeBSD__) \&\& __FreeBSD__ < 9)@' \ + ${WRKSRC}/afl-as.h post-install: .if ${PORT_OPTIONS:MDOCS} ${INSTALL_DATA} ${WRKSRC}/docs/COPYING ${STAGEDIR}${DOCSDIR}/ .endif -.include +.include diff --git security/afl/distinfo security/afl/distinfo index 4b1882f..1b796a9 100644 --- security/afl/distinfo +++ security/afl/distinfo @@ -1,2 +1,2 @@ -SHA256 (afl-0.61b.tgz) = edff2e8f2c37041bdbb225ee7095587c1a744a3bc44f1e52491904ae986b4f9f -SIZE (afl-0.61b.tgz) = 678088 +SHA256 (afl-0.61b.tgz) = 6f0613c4568bb24f43c8672c351a7205c41836f0d6def9ce98b75aca119d3a1e +SIZE (afl-0.61b.tgz) = 678234 ------------------------------------------------- VFEmail.net - http://www.vfemail.net ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the NSA's hands! $24.95 ONETIME Lifetime accounts with Privacy Features! 15GB disk! No bandwidth quotas! Commercial and Bulk Mail Options!