Inside Bitcoin
Opening the selected file…
Inside Bitcoin
Opening the selected file…
The code behind the network, with room to understand it.
Release published 2026-10-28 · Snapshot fetched 2026-11-01. Latest stable release at fetch time; development branches and Git history are excluded. Only the selected code window and visible folders load here.
1This patch can be removed when using GCC 14.4, 15.3 or 16.x.214.x: https://github.com/gcc-mirror/gcc/commit/2d7099faa5c59b871e3027268d70a8a46d892824315.x: https://github.com/gcc-mirror/gcc/commit/7debee2cb6503b2af0f1d43b0e56b759474396d5416.x: https://github.com/gcc-mirror/gcc/commit/c6085ca0ed4cef3bcf4eb382cb71e44219c10f6e6commit b46614ebfc57ccca8a050668ad0e8ba5968c59437Author: Jakub Jelinek <[email protected]>8Date: Tue Jan 6 08:36:20 2026 +010010tree-object-size: Deterministic SSA generation [PR123351]12The order of evaluation of function arguments is unspecified in C++.13The function object_sizes_set_temp called object_sizes_set with two14calls to make_ssa_name() as arguments. Since make_ssa_name() has the15side effect of incrementing the global SSA version counter, different16architectures of the same compiler evaluated these calls in different17orders.19This resulted in non-deterministic SSA version numbering between20x86_64 and aarch64 hosts during cross-compilation, leading to21divergent object files.23Sequencing the calls into separate statements ensures deterministic24evaluation order.26https://gcc.gnu.org/bugzilla/show_bug.cgi?id=12335127https://gcc.gnu.org/pipermail/gcc-patches/2026-January/704817.html292026-01-06 Jakub Jelinek <[email protected]>30Marco Falke <[email protected]>32PR tree-optimization/12335133* tree-object-size.cc (object_sizes_set_temp): Separate calls to34make_ssa_name to ensure deterministic execution order.36diff --git a/gcc/tree-object-size.cc b/gcc/tree-object-size.cc37index 018fbc30cbb..24e7d710371 10064438--- a/gcc/tree-object-size.cc39+++ b/gcc/tree-object-size.cc40@@ -319,9 +319,11 @@ object_sizes_set_temp (struct object_size_info *osi, unsigned varno)41tree val = object_sizes_get (osi, varno);43if (size_initval_p (val, osi->object_size_type))44- object_sizes_set (osi, varno,45- make_ssa_name (sizetype),46- make_ssa_name (sizetype));47+ {48+ val = make_ssa_name (sizetype);49+ tree wholeval = make_ssa_name (sizetype);50+ object_sizes_set (osi, varno, val, wholeval);51+ }52}54/* Initialize OFFSET_LIMIT variable. */
Independent explanations by MyBitcoinExplorer. Not affiliated with or endorsed by Bitcoin Core. Guides are educational and do not replace the source or its tests.
Bitcoin Core source © its contributors, distributed under the MIT license. Original notices and bundled third-party licenses are retained in the source tree.