2021-05-04 13:02:07 +02:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
#
|
2022-12-24 23:49:50 +00:00
|
|
|
# Copyright (c) 2020-2022 The Bitcoin Core developers
|
2021-05-04 13:02:07 +02:00
|
|
|
# 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
|
|
|
|
|
2023-05-24 12:09:30 +01:00
|
|
|
export CI_IMAGE_NAME_TAG="ubuntu:22.04"
|
2023-07-31 13:10:38 +02:00
|
|
|
LIBCXX_DIR="/msan/cxx_build/"
|
2021-05-04 13:02:07 +02:00
|
|
|
export MSAN_FLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 -fno-omit-frame-pointer -g -O1 -fno-optimize-sibling-calls"
|
2023-04-13 14:50:59 +01:00
|
|
|
LIBCXX_FLAGS="-nostdinc++ -nostdlib++ -isystem ${LIBCXX_DIR}include/c++/v1 -L${LIBCXX_DIR}lib -Wl,-rpath,${LIBCXX_DIR}lib -lc++ -lc++abi -lpthread -Wno-unused-command-line-argument"
|
2021-05-04 13:02:07 +02:00
|
|
|
export MSAN_AND_LIBCXX_FLAGS="${MSAN_FLAGS} ${LIBCXX_FLAGS}"
|
|
|
|
|
2023-01-07 11:48:06 +01:00
|
|
|
export CONTAINER_NAME="ci_native_fuzz_msan"
|
2023-05-23 18:09:32 +01:00
|
|
|
export PACKAGES="cmake ninja-build"
|
2022-03-29 10:59:43 +01:00
|
|
|
# BDB generates false-positives and will be removed in future
|
2023-05-23 13:58:14 +01:00
|
|
|
export DEP_OPTS="NO_BDB=1 NO_QT=1 CC=clang CXX=clang++ CFLAGS='${MSAN_FLAGS}' CXXFLAGS='${MSAN_AND_LIBCXX_FLAGS}'"
|
2021-05-04 13:02:07 +02:00
|
|
|
export GOAL="install"
|
2023-05-23 13:58:14 +01:00
|
|
|
export BITCOIN_CONFIG="--enable-fuzz --with-sanitizers=fuzzer,memory --disable-hardening --with-asm=no CFLAGS='${MSAN_FLAGS}' CPPFLAGS='-DBOOST_MULTI_INDEX_ENABLE_SAFE_MODE' CXXFLAGS='${MSAN_AND_LIBCXX_FLAGS}'"
|
2021-05-04 13:02:07 +02:00
|
|
|
export USE_MEMORY_SANITIZER="true"
|
|
|
|
export RUN_UNIT_TESTS="false"
|
|
|
|
export RUN_FUNCTIONAL_TESTS="false"
|
|
|
|
export RUN_FUZZ_TESTS=true
|
2023-07-30 21:36:56 +01:00
|
|
|
export CCACHE_MAXSIZE=250M
|