Merge 1344d3bd0f into merged_master (Bitcoin PR bitcoin/bitcoin#32136)

This commit is contained in:
ivanlele 2026-07-13 14:05:34 +00:00
commit c8f4c0dc55
No known key found for this signature in database
6 changed files with 22 additions and 12 deletions

View file

@ -26,7 +26,7 @@ set(CLIENT_NAME "Elements Core")
set(CLIENT_VERSION_MAJOR 29)
set(CLIENT_VERSION_MINOR 0)
set(CLIENT_VERSION_BUILD 0)
set(CLIENT_VERSION_RC 2)
set(CLIENT_VERSION_RC 3)
set(CLIENT_VERSION_IS_RELEASE "true")
set(COPYRIGHT_YEAR "2025")
@ -384,6 +384,7 @@ if(SANITIZERS)
int main() { return 0; }
"
RESULT_VAR linker_supports_sanitizers
NO_CACHE_IF_FAILED
)
if(NOT linker_supports_sanitizers)
message(FATAL_ERROR "Linker did not accept requested flags, you are missing required libraries.")

View file

@ -20,7 +20,7 @@ In configuration output, this function prints a string by the following pattern:
function(try_append_linker_flag flag)
cmake_parse_arguments(PARSE_ARGV 1
TALF # prefix
"" # options
"NO_CACHE_IF_FAILED" # options
"TARGET;VAR;SOURCE;RESULT_VAR" # one_value_keywords
"IF_CHECK_PASSED" # multi_value_keywords
)
@ -68,6 +68,10 @@ function(try_append_linker_flag flag)
if(DEFINED TALF_RESULT_VAR)
set(${TALF_RESULT_VAR} "${${result}}" PARENT_SCOPE)
endif()
if(NOT ${result} AND TALF_NO_CACHE_IF_FAILED)
unset(${result} CACHE)
endif()
endfunction()
if(MSVC)

View file

@ -206,6 +206,7 @@ endif
$(host_prefix)/toolchain.cmake : toolchain.cmake.in $(host_prefix)/.stamp_$(final_build_id)
@mkdir -p $(@D)
sed -e 's|@depends_crosscompiling@|$(crosscompiling)|' \
-e 's|@host@|$(host)|' \
-e 's|@host_system_name@|$($(host_os)_cmake_system_name)|' \
-e 's|@host_system_version@|$($(host_os)_cmake_system_version)|' \
-e 's|@host_arch@|$(host_arch)|' \

View file

@ -13,6 +13,10 @@ if(@depends_crosscompiling@)
set(CMAKE_SYSTEM_NAME @host_system_name@)
set(CMAKE_SYSTEM_VERSION @host_system_version@)
set(CMAKE_SYSTEM_PROCESSOR @host_arch@)
set(CMAKE_C_COMPILER_TARGET @host@)
set(CMAKE_CXX_COMPILER_TARGET @host@)
set(CMAKE_OBJCXX_COMPILER_TARGET @host@)
endif()
if(NOT DEFINED CMAKE_C_FLAGS_INIT)

View file

@ -92,5 +92,6 @@ FUZZ_TARGET(psbt_base64_decode)
PartiallySignedTransaction psbt;
std::string error;
assert(DecodeBase64PSBT(psbt, random_string, error) == error.empty());
const bool ok{DecodeBase64PSBT(psbt, random_string, error)};
assert(ok == error.empty());
}

View file

@ -1,4 +1,4 @@
// Copyright (c) 2020-2022 The Bitcoin Core developers
// Copyright (c) 2020-present The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@ -116,7 +116,7 @@ FUZZ_TARGET(package_rbf, .init = initialize_package_rbf)
// Add a bunch of parent-child pairs to the mempool, and remember them.
std::vector<CTransaction> mempool_txs;
size_t iter{0};
uint32_t iter{0};
// Keep track of the total vsize of CTxMemPoolEntry's being added to the mempool to avoid overflow
// Add replacement_vsize since this is added to new diagram during RBF check
@ -124,9 +124,8 @@ FUZZ_TARGET(package_rbf, .init = initialize_package_rbf)
if (!replacement_tx) {
return;
}
assert(iter <= g_outpoints.size());
replacement_tx->vin.resize(1);
replacement_tx->vin[0].prevout = g_outpoints[iter++];
replacement_tx->vin[0].prevout = g_outpoints.at(iter++);
CTransaction replacement_tx_final{*replacement_tx};
auto replacement_entry = ConsumeTxMemPoolEntry(fuzzed_data_provider, replacement_tx_final);
int32_t replacement_vsize = replacement_entry.GetTxSize();
@ -134,14 +133,14 @@ FUZZ_TARGET(package_rbf, .init = initialize_package_rbf)
LOCK2(cs_main, pool.cs);
LIMITED_WHILE(fuzzed_data_provider.ConsumeBool(), NUM_ITERS)
{
while (fuzzed_data_provider.ConsumeBool()) {
if (iter >= NUM_ITERS) break;
// Make sure txns only have one input, and that a unique input is given to avoid circular references
CMutableTransaction parent;
assert(iter <= g_outpoints.size());
parent.vin.resize(1);
parent.vin[0].prevout = g_outpoints[iter++];
parent.vout.emplace_back(CAsset(), 0, CScript());
parent.vin[0].prevout = g_outpoints.at(iter++);
parent.vout.emplace_back(CAsset(),0, CScript());
mempool_txs.emplace_back(parent);
const auto parent_entry = ConsumeTxMemPoolEntry(fuzzed_data_provider, mempool_txs.back());