Merge bitcoin/bitcoin#21884: fuzz: Remove unused --enable-danger-fuzz-link-all option

fa27d6d3ac065684a1219e9a948514d27929cf7c fuzz: Remove unused --enable-danger-fuzz-link-all option (MarcoFalke)

Pull request description:

  Remove the unused build option, which was *dangerous* (as the name implies). Also remove the fuzzbuzz config, which was never used as part of this repo and seems redundant now that we integrate with oss-fuzz.

ACKs for top commit:
  practicalswift:
    cr ACK fa27d6d3ac065684a1219e9a948514d27929cf7c: patch looks correct and rationale makes sense
  hebasto:
    ACK fa27d6d3ac065684a1219e9a948514d27929cf7c, I have reviewed the code and it looks OK, I agree it can be merged.

Tree-SHA512: 9bd65ed6a76d13d8d9c7a88aaae30f701215d5d0619693a3115d5ec350808aaf6a1aa4737466a5b96f3948513ec4d063808fe16219818366720e247880a15177
This commit is contained in:
fanquake 2021-05-09 11:25:18 +08:00 committed by Konstantin Akimov
parent 51633d70ea
commit eeec2f2799
No known key found for this signature in database
GPG Key ID: 2176C4A5D01EA524
4 changed files with 0 additions and 56 deletions

View File

@ -1,16 +0,0 @@
base: ubuntu:focal
language: c++
engine: libFuzzer
environment:
- CXXFLAGS=-fcoverage-mapping -fno-omit-frame-pointer -fprofile-instr-generate -gline-tables-only -O1
setup:
- sudo apt-get update
- sudo apt-get install -y autoconf bsdmainutils clang git libboost-system-dev libboost-filesystem-dev libboost-test-dev libc++1 libc++abi1 libc++abi-dev libc++-dev libclang1 libclang-dev libdb5.3++ libevent-dev libllvm-ocaml-dev libomp5 libomp-dev libqt5core5a libqt5dbus5 libqt5gui5 libtool llvm llvm-dev llvm-runtime pkg-config qttools5-dev qttools5-dev-tools software-properties-common
- ./autogen.sh
- CC=clang CXX=clang++ ./configure --enable-fuzz --with-sanitizers=address,fuzzer,undefined --enable-danger-fuzz-link-all
- make
- git clone https://github.com/bitcoin-core/qa-assets
auto_targets:
find_targets_command: find src/test/fuzz/ -executable -type f ! -name "*.cpp" ! -name "*.h"
base_corpus_dir: qa-assets/fuzz_seed_corpus/
memory_limit: none

View File

@ -185,12 +185,6 @@ AC_ARG_ENABLE([fuzz-binary],
[enable_fuzz_binary=$enableval], [enable_fuzz_binary=$enableval],
[enable_fuzz_binary=yes]) [enable_fuzz_binary=yes])
AC_ARG_ENABLE([danger_fuzz_link_all],
AS_HELP_STRING([--enable-danger-fuzz-link-all],
[Danger! Modifies source code. Needs git and gnu sed installed. Link each fuzz target (default no).]),
[enable_danger_fuzz_link_all=$enableval],
[enable_danger_fuzz_link_all=no])
AC_ARG_WITH([qrencode], AC_ARG_WITH([qrencode],
[AS_HELP_STRING([--with-qrencode], [AS_HELP_STRING([--with-qrencode],
[enable QR code support (default is yes if qt is enabled and libqrencode is found)])], [enable QR code support (default is yes if qt is enabled and libqrencode is found)])],
@ -1818,7 +1812,6 @@ AM_CONDITIONAL([ENABLE_TRACING],[test x$have_sdt = xyes])
AM_CONDITIONAL([ENABLE_TESTS],[test x$BUILD_TEST = xyes]) AM_CONDITIONAL([ENABLE_TESTS],[test x$BUILD_TEST = xyes])
AM_CONDITIONAL([ENABLE_FUZZ],[test x$enable_fuzz = xyes]) AM_CONDITIONAL([ENABLE_FUZZ],[test x$enable_fuzz = xyes])
AM_CONDITIONAL([ENABLE_FUZZ_BINARY],[test x$enable_fuzz_binary = xyes]) AM_CONDITIONAL([ENABLE_FUZZ_BINARY],[test x$enable_fuzz_binary = xyes])
AM_CONDITIONAL([ENABLE_FUZZ_LINK_ALL],[test x$enable_danger_fuzz_link_all = xyes])
AM_CONDITIONAL([ENABLE_QT],[test x$bitcoin_enable_qt = xyes]) AM_CONDITIONAL([ENABLE_QT],[test x$bitcoin_enable_qt = xyes])
AM_CONDITIONAL([ENABLE_QT_TESTS],[test x$BUILD_TEST_QT = xyes]) AM_CONDITIONAL([ENABLE_QT_TESTS],[test x$BUILD_TEST_QT = xyes])
AM_CONDITIONAL([ENABLE_BENCH],[test x$use_bench = xyes]) AM_CONDITIONAL([ENABLE_BENCH],[test x$use_bench = xyes])

View File

@ -398,11 +398,6 @@ univalue_test_object_CPPFLAGS = -I$(srcdir)/$(UNIVALUE_INCLUDE_DIR_INT)
univalue_test_object_LDFLAGS = -static $(LIBTOOL_APP_LDFLAGS) univalue_test_object_LDFLAGS = -static $(LIBTOOL_APP_LDFLAGS)
endif endif
if ENABLE_FUZZ_LINK_ALL
all-local: $(FUZZ_BINARY)
bash ./test/fuzz/danger_link_all.sh
endif
%.cpp.test: %.cpp %.cpp.test: %.cpp
@echo Running tests: $$(\ @echo Running tests: $$(\
cat $< | \ cat $< | \

View File

@ -1,28 +0,0 @@
#!/usr/bin/env bash
# Copyright (c) 2020 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
export LC_ALL=C.UTF-8
set -e
ROOT_DIR="$(git rev-parse --show-toplevel)"
# Run only once (break make recursion)
if [ -d "${ROOT_DIR}/lock_fuzz_link_all" ]; then
exit
fi
mkdir "${ROOT_DIR}/lock_fuzz_link_all"
echo "Linking each fuzz target separately."
for FUZZING_HARNESS in $(PRINT_ALL_FUZZ_TARGETS_AND_ABORT=1 "${ROOT_DIR}/src/test/fuzz/fuzz" | sort -u); do
echo "Building src/test/fuzz/${FUZZING_HARNESS} ..."
git checkout -- "${ROOT_DIR}/src/test/fuzz/fuzz.cpp"
sed -i "s/std::getenv(\"FUZZ\")/\"${FUZZING_HARNESS}\"/g" "${ROOT_DIR}/src/test/fuzz/fuzz.cpp"
make
mv "${ROOT_DIR}/src/test/fuzz/fuzz" "${ROOT_DIR}/src/test/fuzz/${FUZZING_HARNESS}"
done
git checkout -- "${ROOT_DIR}/src/test/fuzz/fuzz.cpp"
rmdir "${ROOT_DIR}/lock_fuzz_link_all"
echo "Successfully built all fuzz targets."