Skip to content

[31.x] Backports - #36901

Merged
fanquake merged 5 commits into
bitcoin:31.xfrom
fanquake:more_31_x_backports
Nov 19, 2026
Merged

fanquake merged 5 commits into
bitcoin:31.xfrom
fanquake:more_31_x_backports

Conversation

@fanquake

@fanquake fanquake commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

The `stl_tree_node`, `list_node` and `unordered_node` class templates
only mimic the layout of the standard library's container nodes, so
that `sizeof` yields an estimate of the memory they use. Their fields
are never accessed.

Since llvm/llvm-project#237374, Clang 24 diagnoses these fields with
`-Wunused-private-field`.

This change drops the `private:` access specifiers. It does not affect
the size or alignment of the structs, as all their fields keep the same
access control, and it is consistent with `stl_shared_counter`.

Github-Pull: bitcoin#36869
Rebased-From: b9a6b0c
@fanquake fanquake added this to the 31.4 milestone Nov 17, 2026
@DrahtBot

DrahtBot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

External sites

Reviews

See the guideline and AI policy for information on the review process.

Type Reviewers
ACK instagibbs

If your review is incorrectly listed, please copy-paste <!--meta-tag:bot-skip--> into the comment that the bot should ignore.

Use of non-target directives is not recommended. As of CMake 4.5.0, it
triggers `-Wnon-target-directive` warnings.

Github-Pull: bitcoin#36889
Rebased-From: 460f877
The module is superseded by CMake's `-Wnon-target-directive` warnings,
which are enabled when using the "dev-mode" preset.

Github-Pull: bitcoin#36889
Rebased-From: 435d5b2
@instagibbs

Copy link
Copy Markdown
Member

clACK cc461e3

@fanquake
fanquake marked this pull request as ready for review November 18, 2026 16:34
Crypt-iQ and others added 2 commits November 18, 2026 16:43
MaybeDiscourageAndDisconnect calls DisconnectNode which creates a
CSubNet containing only the CNode's address. This will disconnect
every CNode with the same IP address. This is normally not a problem,
except for clearnet-over-tor. If a node has an honest clearnet-over-tor
inbound connection, the IP of the inbound peer will be the exit node's
IP address. If an attacker connects to the node through the same exit
node and sends an invalid message, they can cause every inbound peer
sharing the exit node's IP to get disconnect. Fix this by only
disconnecting the misbehaving CNode rather than every CNode sharing
the IP.

Github-Pull: bitcoin#36894
Rebased-From: d63068c
@Crypt-iQ

Copy link
Copy Markdown
Contributor

Checked that 35f34a3 specifically is correct

@instagibbs

Copy link
Copy Markdown
Member

clACK 1fed214

@fanquake
fanquake merged commit 5588c76 into bitcoin:31.x Nov 19, 2026
48 of 50 checks passed
@fanquake
fanquake deleted the more_31_x_backports branch November 19, 2026 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants