From 166fea73eb1d194e4e80945bcd53e70179622c6e Mon Sep 17 00:00:00 2001 From: 0xb10c Date: Wed, 4 Dec 2024 15:51:17 +0100 Subject: [PATCH 1/5] test: fix MIN macro-redefinition Renames the `MIN` macro to `_TRACEPOINT_TEST_MIN`. From #31418: ``` stderr: /virtual/main.c:70:9: warning: 'MIN' macro redefined [-Wmacro-redefined] 70 | #define MIN(a,b) ({ __typeof__ (a) _a = (a); __typeof__ (b) _b = (b); _a < _b ? _a : _b; }) | ^ include/linux/minmax.h:329:9: note: previous definition is here 329 | #define MIN(a,b) __cmp(min,a,b) | ^ 1 warning generated. ``` fixes: https://github.com/bitcoin/bitcoin/issues/31418 Github-Pull: #31419 Rebased-From: 00c1dbd26ddb816e5541c5724397015a92a3d06b --- test/functional/interface_usdt_net.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/test/functional/interface_usdt_net.py b/test/functional/interface_usdt_net.py index 5d7c8c23041..58570399c19 100755 --- a/test/functional/interface_usdt_net.py +++ b/test/functional/interface_usdt_net.py @@ -40,7 +40,8 @@ net_tracepoints_program = """ MAX_MSG_TYPE_LENGTH, MAX_MSG_DATA_LENGTH ) + """ -#define MIN(a,b) ({ __typeof__ (a) _a = (a); __typeof__ (b) _b = (b); _a < _b ? _a : _b; }) +// A min() macro. Prefixed with _TRACEPOINT_TEST to avoid collision with other MIN macros. +#define _TRACEPOINT_TEST_MIN(a,b) ({ __typeof__ (a) _a = (a); __typeof__ (b) _b = (b); _a < _b ? _a : _b; }) struct p2p_message { @@ -60,7 +61,7 @@ int trace_inbound_message(struct pt_regs *ctx) { bpf_usdt_readarg_p(3, ctx, &msg.peer_conn_type, MAX_PEER_CONN_TYPE_LENGTH); bpf_usdt_readarg_p(4, ctx, &msg.msg_type, MAX_MSG_TYPE_LENGTH); bpf_usdt_readarg(5, ctx, &msg.msg_size); - bpf_usdt_readarg_p(6, ctx, &msg.msg, MIN(msg.msg_size, MAX_MSG_DATA_LENGTH)); + bpf_usdt_readarg_p(6, ctx, &msg.msg, _TRACEPOINT_TEST_MIN(msg.msg_size, MAX_MSG_DATA_LENGTH)); inbound_messages.perf_submit(ctx, &msg, sizeof(msg)); return 0; } @@ -73,7 +74,7 @@ int trace_outbound_message(struct pt_regs *ctx) { bpf_usdt_readarg_p(3, ctx, &msg.peer_conn_type, MAX_PEER_CONN_TYPE_LENGTH); bpf_usdt_readarg_p(4, ctx, &msg.msg_type, MAX_MSG_TYPE_LENGTH); bpf_usdt_readarg(5, ctx, &msg.msg_size); - bpf_usdt_readarg_p(6, ctx, &msg.msg, MIN(msg.msg_size, MAX_MSG_DATA_LENGTH)); + bpf_usdt_readarg_p(6, ctx, &msg.msg, _TRACEPOINT_TEST_MIN(msg.msg_size, MAX_MSG_DATA_LENGTH)); outbound_messages.perf_submit(ctx, &msg, sizeof(msg)); return 0; }; From c70bd786f8971fc2f3e23ef35b29ec89e433959d Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Sat, 14 Dec 2024 20:32:38 +0000 Subject: [PATCH 2/5] depends: Fix CXXFLAGS on NetBSD This change corrects an issue where CXXFLAGS were mistakenly overridden by CFLAGS. Github-Pull: #31502 Rebased-From: a10bb400e8cb0da0030114ee59f2e7c8494aef42 --- depends/hosts/netbsd.mk | 2 -- 1 file changed, 2 deletions(-) diff --git a/depends/hosts/netbsd.mk b/depends/hosts/netbsd.mk index f33b2d28895..6e0fa9e12fb 100644 --- a/depends/hosts/netbsd.mk +++ b/depends/hosts/netbsd.mk @@ -7,8 +7,6 @@ netbsd_NM = $(host_toolchain)gcc-nm netbsd_RANLIB = $(host_toolchain)gcc-ranlib endif -netbsd_CXXFLAGS=$(netbsd_CFLAGS) - netbsd_release_CFLAGS=-O2 netbsd_release_CXXFLAGS=$(netbsd_release_CFLAGS) From a1db79c31d89facdb29e8ecd82264d93c3de3c66 Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Thu, 9 Jan 2025 13:36:19 +0000 Subject: [PATCH 3/5] depends: Fix spacing issue This change resolves an issue where a missing space caused the value of the `build_AR` variable to be concatenated with the "NM=" string. This resulted in subsequent calls to `${AR}` and `${NM}` failing. Github-Pull: #31627 Rebased-From: 8a46286da667d19414c30350df48ebf245589e32 --- depends/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/depends/Makefile b/depends/Makefile index 88aae7ad814..d209963302d 100644 --- a/depends/Makefile +++ b/depends/Makefile @@ -147,7 +147,7 @@ include packages/packages.mk # 2. Before including packages/*.mk (excluding packages/packages.mk), since # they rely on the build_id variables # -build_id:=$(shell env CC='$(build_CC)' C_STANDARD='$(C_STANDARD)' CXX='$(build_CXX)' CXX_STANDARD='$(CXX_STANDARD)' AR='$(build_AR) 'NM='$(build_NM)' RANLIB='$(build_RANLIB)' STRIP='$(build_STRIP)' SHA256SUM='$(build_SHA256SUM)' DEBUG='$(DEBUG)' LTO='$(LTO)' NO_HARDEN='$(NO_HARDEN)' ./gen_id '$(BUILD_ID_SALT)' 'GUIX_ENVIRONMENT=$(realpath $(GUIX_ENVIRONMENT))') +build_id:=$(shell env CC='$(build_CC)' C_STANDARD='$(C_STANDARD)' CXX='$(build_CXX)' CXX_STANDARD='$(CXX_STANDARD)' AR='$(build_AR)' NM='$(build_NM)' RANLIB='$(build_RANLIB)' STRIP='$(build_STRIP)' SHA256SUM='$(build_SHA256SUM)' DEBUG='$(DEBUG)' LTO='$(LTO)' NO_HARDEN='$(NO_HARDEN)' ./gen_id '$(BUILD_ID_SALT)' 'GUIX_ENVIRONMENT=$(realpath $(GUIX_ENVIRONMENT))') $(host_arch)_$(host_os)_id:=$(shell env CC='$(host_CC)' C_STANDARD='$(C_STANDARD)' CXX='$(host_CXX)' CXX_STANDARD='$(CXX_STANDARD)' AR='$(host_AR)' NM='$(host_NM)' RANLIB='$(host_RANLIB)' STRIP='$(host_STRIP)' SHA256SUM='$(build_SHA256SUM)' DEBUG='$(DEBUG)' LTO='$(LTO)' NO_HARDEN='$(NO_HARDEN)' ./gen_id '$(HOST_ID_SALT)' 'GUIX_ENVIRONMENT=$(realpath $(GUIX_ENVIRONMENT))') boost_packages_$(NO_BOOST) = $(boost_packages) From 8588d5bbe01310b3549d1626791d51924c386e87 Mon Sep 17 00:00:00 2001 From: 0xb10c Date: Thu, 9 Jan 2025 06:42:05 +0000 Subject: [PATCH 4/5] tracing: Rename the `MIN` macro to `_TRACEPOINT_TEST_MIN` in log_raw_p2p_msgs Inspired by: 00c1dbd26ddb816e5541c5724397015a92a3d06b (#31419) Github-Pull: #31623 Rebased-From: f93f0c93961bbce413101c2a92300a7a29277506 --- contrib/tracing/log_raw_p2p_msgs.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/contrib/tracing/log_raw_p2p_msgs.py b/contrib/tracing/log_raw_p2p_msgs.py index c0ab7041062..67b92ce7b87 100755 --- a/contrib/tracing/log_raw_p2p_msgs.py +++ b/contrib/tracing/log_raw_p2p_msgs.py @@ -41,7 +41,8 @@ from bcc import BPF, USDT program = """ #include -#define MIN(a,b) ({ __typeof__ (a) _a = (a); __typeof__ (b) _b = (b); _a < _b ? _a : _b; }) +// A min() macro. Prefixed with _TRACEPOINT_TEST to avoid collision with other MIN macros. +#define _TRACEPOINT_TEST_MIN(a,b) ({ __typeof__ (a) _a = (a); __typeof__ (b) _b = (b); _a < _b ? _a : _b; }) // Maximum possible allocation size // from include/linux/percpu.h in the Linux kernel @@ -88,7 +89,7 @@ int trace_inbound_message(struct pt_regs *ctx) { bpf_usdt_readarg_p(3, ctx, &msg->peer_conn_type, MAX_PEER_CONN_TYPE_LENGTH); bpf_usdt_readarg_p(4, ctx, &msg->msg_type, MAX_MSG_TYPE_LENGTH); bpf_usdt_readarg(5, ctx, &msg->msg_size); - bpf_usdt_readarg_p(6, ctx, &msg->msg, MIN(msg->msg_size, MAX_MSG_DATA_LENGTH)); + bpf_usdt_readarg_p(6, ctx, &msg->msg, _TRACEPOINT_TEST_MIN(msg->msg_size, MAX_MSG_DATA_LENGTH)); inbound_messages.perf_submit(ctx, msg, sizeof(*msg)); return 0; @@ -108,7 +109,7 @@ int trace_outbound_message(struct pt_regs *ctx) { bpf_usdt_readarg_p(3, ctx, &msg->peer_conn_type, MAX_PEER_CONN_TYPE_LENGTH); bpf_usdt_readarg_p(4, ctx, &msg->msg_type, MAX_MSG_TYPE_LENGTH); bpf_usdt_readarg(5, ctx, &msg->msg_size); - bpf_usdt_readarg_p(6, ctx, &msg->msg, MIN(msg->msg_size, MAX_MSG_DATA_LENGTH)); + bpf_usdt_readarg_p(6, ctx, &msg->msg, _TRACEPOINT_TEST_MIN(msg->msg_size, MAX_MSG_DATA_LENGTH)); outbound_messages.perf_submit(ctx, msg, sizeof(*msg)); return 0; From 25f150304d01940d7936125b7b4bf8e6c01d35aa Mon Sep 17 00:00:00 2001 From: fanquake Date: Wed, 4 Dec 2024 17:32:45 +0000 Subject: [PATCH 5/5] doc: update release notes --- doc/release-notes.md | 48 ++++++++++---------------------------------- 1 file changed, 11 insertions(+), 37 deletions(-) diff --git a/doc/release-notes.md b/doc/release-notes.md index 85bf57c5009..66c62432cd1 100644 --- a/doc/release-notes.md +++ b/doc/release-notes.md @@ -1,9 +1,9 @@ -27.2 Release Notes +27.x Release Notes ===================== -Bitcoin Core version 27.2 is now available from: +Bitcoin Core version 27.x is now available from: - + This release includes various bug fixes and performance improvements, as well as updated translations. @@ -40,53 +40,27 @@ unsupported systems. Notable changes =============== -### P2P - -- #30394 net: fix race condition in self-connect detection - -### Init - -- #30435 init: change shutdown order of load block thread and scheduler - -### RPC - -- #30357 Fix cases of calls to FillPSBT errantly returning complete=true - -### PSBT - -- #29855 psbt: Check non witness utxo outpoint early - ### Test -- #30552 test: fix constructor of msg_tx - -### Doc - -- #30504 doc: use proper doxygen formatting for CTxMemPool::cs +- #31419 test: fix MIN macro redefinition ### Build -- #30283 upnp: fix build with miniupnpc 2.2.8 -- #30633 Fixes for GCC 15 compatibility +- #31502 depends: Fix CXXFLAGS on NetBSD +- #31627 depends: Fix spacing issue -### CI +### Misc + +- #31623 tracing: Rename the MIN macro to TRACEPOINT_TEST_MIN in log_raw_p2p_msgs -- #30193 ci: move ASan job to GitHub Actions from Cirrus CI -- #30299 ci: remove unused bcc variable from workflow Credits ======= Thanks to everyone who directly contributed to this release: -- Ava Chow -- Cory Fields -- Martin Zumsande -- Matt Whitlock -- Max Edwards -- Sebastian Falbesoner -- Vasil Dimov -- willcl-ark +- 0xb10c +- Hennadii Stepanov As well as to everyone that helped with translations on [Transifex](https://www.transifex.com/bitcoin/bitcoin/).