Skip to content

Commit 74ea7ed

Browse files
committed
Merge bitcoin#31522: ci: Enable DEBUG=1 for one GCC-12+ build to catch 117966 regressions
fa8ade3 refactor: Avoid GCC false positive error (MarcoFalke) fa40807 ci: Enable DEBUG=1 for one GCC-12+ build to catch 117966 regressions (MarcoFalke) Pull request description: It is possible that someone accidentally removes the workaround in fa9e048, or more likely that someone accidentally adds new code without the workaround. Avoid this by adding a temporary CI check. This can be tested by reverting the workaround and observing a failure. ACKs for top commit: hebasto: ACK fa8ade3, I've tested locally on Ubuntu 24.04. Tree-SHA512: 7ee1538fd5304a5ab91ac8c7619a573548d7e0345592a1e9d38b3b73729e09e7c77a9ee703d64cf02a8218de3148376d7836e294abb939aa7533034ba36dfb6c
2 parents f34c580 + fa8ade3 commit 74ea7ed

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

ci/test/00_setup_env_native_centos.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,6 @@ export CONTAINER_NAME=ci_native_centos
1010
export CI_IMAGE_NAME_TAG="quay.io/centos/centos:stream10"
1111
export CI_BASE_PACKAGES="gcc-c++ glibc-devel libstdc++-devel ccache make git python3 python3-pip which patch xz procps-ng ksh rsync coreutils bison e2fsprogs cmake"
1212
export PIP_PACKAGES="pyzmq"
13+
export DEP_OPTS="DEBUG=1" # Temporarily enable a DEBUG=1 build to check for GCC-bug-117966 regressions. This can be removed once the minimum GCC version is bumped to 12 in the previous releases task, see https://github.com/bitcoin/bitcoin/issues/31436#issuecomment-2530717875
1314
export GOAL="install"
14-
export BITCOIN_CONFIG="-DWITH_ZMQ=ON -DBUILD_GUI=ON -DREDUCE_EXPORTS=ON"
15+
export BITCOIN_CONFIG="-DWITH_ZMQ=ON -DBUILD_GUI=ON -DREDUCE_EXPORTS=ON -DCMAKE_BUILD_TYPE=Debug"

src/test/fuzz/float.cpp

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) 2020-2021 The Bitcoin Core developers
1+
// Copyright (c) 2020-present The Bitcoin Core developers
22
// Distributed under the MIT software license, see the accompanying
33
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
44

@@ -11,14 +11,15 @@
1111
#include <cassert>
1212
#include <cmath>
1313
#include <limits>
14+
#include <optional>
1415

1516
FUZZ_TARGET(float)
1617
{
1718
FuzzedDataProvider fuzzed_data_provider(buffer.data(), buffer.size());
1819

1920
{
2021
const double d{[&] {
21-
double tmp;
22+
std::optional<double> tmp;
2223
CallOneOf(
2324
fuzzed_data_provider,
2425
// an actual number
@@ -42,7 +43,7 @@ FUZZ_TARGET(float)
4243
}); },
4344
// Anything from raw memory (also checks that DecodeDouble doesn't crash on any input)
4445
[&] { tmp = DecodeDouble(fuzzed_data_provider.ConsumeIntegral<uint64_t>()); });
45-
return tmp;
46+
return *tmp;
4647
}()};
4748
(void)memusage::DynamicUsage(d);
4849

0 commit comments

Comments
 (0)