Skip to content

Commit 020c2b7

Browse files
committed
Merge bitcoin/bitcoin#22923: test: Switch multiprocess to clang i686 build
fa309ee bench: Fix 32-bit compilation failure in addrman bench (MarcoFalke) fae0295 ci: Switch multiprocess to i686 build (MarcoFalke) Pull request description: Building for i686 with clang helps to catch bugs early for: * The OSS-Fuzz i686 clang libFuzzer build * The arm 32-bit native clang build Fixes #22889 ACKs for top commit: hebasto: ACK fa309ee Tree-SHA512: 581820d319aae2fcd4dd44979ee3d4164a575f0438476890aa2a7447f1392a5da26766cd6ab954530499b54f66eec2417bdeefdd7efb19bc27dd679cd2b9d0ce
2 parents fac7181 + fa309ee commit 020c2b7

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

.cirrus.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ task:
233233
FILE_ENV: "./ci/test/00_setup_env_native_fuzz.sh"
234234

235235
task:
236-
name: '[multiprocess, DEBUG] [focal]'
236+
name: '[multiprocess, i686, DEBUG] [focal]'
237237
<< : *GLOBAL_TASK_TEMPLATE
238238
container:
239239
image: ubuntu:focal
@@ -242,7 +242,7 @@ task:
242242
env:
243243
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
244244
MAKEJOBS: "-j8"
245-
FILE_ENV: "./ci/test/00_setup_env_native_multiprocess.sh"
245+
FILE_ENV: "./ci/test/00_setup_env_i686_multiprocess.sh"
246246

247247
task:
248248
name: '[no wallet] [bionic]'

ci/test/00_setup_env_native_multiprocess.sh renamed to ci/test/00_setup_env_i686_multiprocess.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@
66

77
export LC_ALL=C.UTF-8
88

9-
export CONTAINER_NAME=ci_native_multiprocess
9+
export HOST=i686-pc-linux-gnu
10+
export CONTAINER_NAME=ci_i686_multiprocess
1011
export DOCKER_NAME_TAG=ubuntu:20.04
11-
export PACKAGES="cmake python3 python3-pip llvm clang"
12+
export PACKAGES="cmake python3 python3-pip llvm clang g++-multilib"
1213
export DEP_OPTS="DEBUG=1 MULTIPROCESS=1"
1314
export GOAL="install"
14-
export BITCOIN_CONFIG="--enable-debug CC=clang CXX=clang++" # Use clang to avoid OOM
15+
export BITCOIN_CONFIG="--enable-debug CC='clang -m32' CXX='clang++ -m32' LDFLAGS='--rtlib=compiler-rt -lgcc_s'"
1516
export TEST_RUNNER_ENV="BITCOIND=bitcoin-node"
1617
export PIP_PACKAGES="lief"

src/bench/addrman.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#include <addrman.h>
66
#include <bench/bench.h>
77
#include <random.h>
8+
#include <util/check.h>
89
#include <util/time.h>
910

1011
#include <optional>
@@ -110,7 +111,8 @@ static void AddrManGood(benchmark::Bench& bench)
110111
* we want to do the same amount of work in every loop iteration. */
111112

112113
bench.epochs(5).epochIterations(1);
113-
const size_t addrman_count{bench.epochs() * bench.epochIterations()};
114+
const uint64_t addrman_count{bench.epochs() * bench.epochIterations()};
115+
Assert(addrman_count == 5U);
114116

115117
std::vector<std::unique_ptr<CAddrMan>> addrmans(addrman_count);
116118
for (size_t i{0}; i < addrman_count; ++i) {

0 commit comments

Comments
 (0)