From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 33460158094 for ; Mon, 4 Jul 2022 23:24:23 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 629F6E0AE8; Mon, 4 Jul 2022 23:24:20 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 1F339E0AE8 for ; Mon, 4 Jul 2022 23:24:20 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 82FC53419FF for ; Mon, 4 Jul 2022 23:24:18 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 817A2529 for ; Mon, 4 Jul 2022 23:24:15 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1656977040.0a69da48bddc8566105c52fe6f23cfbabb615bc7.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: app-forensics/aflplusplus/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: app-forensics/aflplusplus/files/aflplusplus-4.01c-no-ignore-errors-makefile.patch app-forensics/aflplusplus/files/aflplusplus-4.01c-respect-flags.patch X-VCS-Directories: app-forensics/aflplusplus/files/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 0a69da48bddc8566105c52fe6f23cfbabb615bc7 X-VCS-Branch: master Date: Mon, 4 Jul 2022 23:24:15 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 75093720-4b8e-4b0f-b1ee-f5fff95dd04c X-Archives-Hash: 1cb34d631b6be109d49027e66ed16265 commit: 0a69da48bddc8566105c52fe6f23cfbabb615bc7 Author: Alexander Miller gmx de> AuthorDate: Mon Jul 4 16:31:44 2022 +0000 Commit: Sam James gentoo org> CommitDate: Mon Jul 4 23:24:00 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0a69da48 app-forensics/aflplusplus: Don't use *FLAGS when testing CC wrappers The flags used to build the package could be incompatible with the wrapper due to gcc vs. clang differences. Doesn't affect installed files. Signed-off-by: Alexander Miller gmx.de> Signed-off-by: Sam James gentoo.org> ...flplusplus-4.01c-no-ignore-errors-makefile.patch | 2 +- .../files/aflplusplus-4.01c-respect-flags.patch | 21 ++++++++++++++++++++- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/app-forensics/aflplusplus/files/aflplusplus-4.01c-no-ignore-errors-makefile.patch b/app-forensics/aflplusplus/files/aflplusplus-4.01c-no-ignore-errors-makefile.patch index 95718bb3a32d..8a78e7d791d8 100644 --- a/app-forensics/aflplusplus/files/aflplusplus-4.01c-no-ignore-errors-makefile.patch +++ b/app-forensics/aflplusplus/files/aflplusplus-4.01c-no-ignore-errors-makefile.patch @@ -147,7 +147,7 @@ https://bugs.gentoo.org/800941 @@ -463,6 +463,7 @@ document: test_build: $(PROGS) @echo "[*] Testing the CC wrapper and instrumentation output..." - unset AFL_USE_ASAN AFL_USE_MSAN AFL_INST_RATIO; ASAN_OPTIONS=detect_leaks=0 AFL_QUIET=1 AFL_PATH=. AFL_LLVM_LAF_ALL=1 ./afl-cc $(CFLAGS) $(CPPFLAGS) ./test-instr.c -o test-instr $(LDFLAGS) + unset AFL_USE_ASAN AFL_USE_MSAN AFL_INST_RATIO; ASAN_OPTIONS=detect_leaks=0 AFL_QUIET=1 AFL_PATH=. AFL_LLVM_LAF_ALL=1 ./afl-cc ./test-instr.c -o test-instr + @test -e test-instr || { echo "[-] Testing CC wrapper failed. You seem not to have a working compiler." ; exit 1; } ASAN_OPTIONS=detect_leaks=0 ./afl-showmap -m none -q -o .test-instr0 ./test-instr < /dev/null echo 1 | ASAN_OPTIONS=detect_leaks=0 ./afl-showmap -m none -q -o .test-instr1 ./test-instr diff --git a/app-forensics/aflplusplus/files/aflplusplus-4.01c-respect-flags.patch b/app-forensics/aflplusplus/files/aflplusplus-4.01c-respect-flags.patch index d22d582ecaa9..e4d56c25095e 100644 --- a/app-forensics/aflplusplus/files/aflplusplus-4.01c-respect-flags.patch +++ b/app-forensics/aflplusplus/files/aflplusplus-4.01c-respect-flags.patch @@ -1,3 +1,7 @@ +* Respect CFLAGS everywhere when building. +* Ignore build flags then when testing the CC wrappers (could contain + incompatible flags). + --- a/GNUmakefile +++ b/GNUmakefile @@ -423,7 +423,7 @@ afl-as: src/afl-as.c include/afl-as.h $(COMM_HDR) | test_x86 @@ -9,6 +13,15 @@ src/afl-common.o : $(COMM_HDR) src/afl-common.c include/common.h $(CC) $(CFLAGS) $(CFLAGS_FLTO) -c src/afl-common.c -o src/afl-common.o +@@ -531,7 +531,7 @@ .PHONY: test_build + ifndef AFL_NO_X86 + test_build: afl-cc afl-gcc afl-as afl-showmap + @echo "[*] Testing the CC wrapper afl-cc and its instrumentation output..." +- @unset AFL_MAP_SIZE AFL_USE_UBSAN AFL_USE_CFISAN AFL_USE_LSAN AFL_USE_ASAN AFL_USE_MSAN; ASAN_OPTIONS=detect_leaks=0 AFL_INST_RATIO=100 AFL_PATH=. ./afl-cc test-instr.c $(LDFLAGS) -o test-instr 2>&1 || (echo "Oops, afl-cc failed"; exit 1 ) ++ @unset AFL_MAP_SIZE AFL_USE_UBSAN AFL_USE_CFISAN AFL_USE_LSAN AFL_USE_ASAN AFL_USE_MSAN; ASAN_OPTIONS=detect_leaks=0 AFL_INST_RATIO=100 AFL_PATH=. ./afl-cc test-instr.c -o test-instr 2>&1 || (echo "Oops, afl-cc failed"; exit 1 ) + ASAN_OPTIONS=detect_leaks=0 ./afl-showmap -m none -q -o .test-instr0 ./test-instr < /dev/null + echo 1 | ASAN_OPTIONS=detect_leaks=0 ./afl-showmap -m none -q -o .test-instr1 ./test-instr + @rm -f test-instr --- a/GNUmakefile.gcc_plugin +++ b/GNUmakefile.gcc_plugin @@ -131,18 +131,18 @@ afl-common.o: ./src/afl-common.c @@ -36,7 +49,7 @@ ln -sf afl-cc.8 afl-gcc-fast.8 --- a/GNUmakefile.llvm +++ b/GNUmakefile.llvm -@@ -444,20 +444,20 @@ afl-llvm-dict2file.so: instrumentation/afl-llvm-dict2file.so.cc instrumentation/ +@@ -444,25 +444,25 @@ afl-llvm-dict2file.so: instrumentation/afl-llvm-dict2file.so.cc instrumentation/ .PHONY: document document: @@ -63,6 +76,12 @@ .PHONY: test_build test_build: $(PROGS) + @echo "[*] Testing the CC wrapper and instrumentation output..." +- unset AFL_USE_ASAN AFL_USE_MSAN AFL_INST_RATIO; ASAN_OPTIONS=detect_leaks=0 AFL_QUIET=1 AFL_PATH=. AFL_LLVM_LAF_ALL=1 ./afl-cc $(CFLAGS) $(CPPFLAGS) ./test-instr.c -o test-instr $(LDFLAGS) ++ unset AFL_USE_ASAN AFL_USE_MSAN AFL_INST_RATIO; ASAN_OPTIONS=detect_leaks=0 AFL_QUIET=1 AFL_PATH=. AFL_LLVM_LAF_ALL=1 ./afl-cc ./test-instr.c -o test-instr + ASAN_OPTIONS=detect_leaks=0 ./afl-showmap -m none -q -o .test-instr0 ./test-instr < /dev/null + echo 1 | ASAN_OPTIONS=detect_leaks=0 ./afl-showmap -m none -q -o .test-instr1 ./test-instr + @rm -f test-instr --- a/custom_mutators/honggfuzz/Makefile +++ b/custom_mutators/honggfuzz/Makefile @@ -1,5 +1,6 @@