it->second.nscore = static_cast<int>(static_cast<unsigned> (it->second.nscore) + 1U);
)
See: Issue #24049; Discussion on stackoverflow.
Fix #24049: signed integer overflow in SeenLocal
#26399
pull
ViralTaco
wants to merge
4
commits into
bitcoin:master
from
ViralTaco:patch-1
changing
1
files
+1 −1
-
ViralTaco commented at 2:09 am on October 27, 2022: noneThis commit makes the behavior defined (unsigned integer overflow as if:
-
Fix #24049: signed integer overflow in `SeenLocal`
This commit makes the code valid.
-
ViralTaco marked this as ready for review on Oct 27, 2022
-
hebasto commented at 8:19 am on October 27, 2022: member
Did you see a discussion in #24090? Especially, #24090 (comment) and #24090 (comment)?
-
DrahtBot commented at 2:09 pm on October 27, 2022: contributor
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
Reviews
See the guideline for information on the review process. A summary of reviews will appear here.
Conflicts
Reviewers, this pull request conflicts with the following ones:
- #25390 (sync: introduce a thread-safe generic container and use it to remove a bunch of “GlobalMutex"es by vasild)
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.
-
luke-jr commented at 5:32 pm on October 27, 2022: memberDoesn’t appear to actually fix the issue though?
-
Merge branch 'bitcoin:master' into patch-1 1910df5463
-
maflcko added the label Needs rebase on Oct 31, 2022
-
DrahtBot removed the label Needs rebase on Oct 31, 2022
-
Merge branch 'bitcoin:master' into patch-1 58d9a4fd58
-
Merge branch 'bitcoin:master' into patch-1 a1f1af1cde
-
maflcko commented at 2:33 pm on November 18, 2022: memberLooking at the previous comments, this doesn’t seem to be a fix. Let’s continue discussion in the issue for now.
-
maflcko closed this on Nov 18, 2022
-
ViralTaco commented at 7:20 pm on November 20, 2022: none
Looking at the previous comments, this doesn’t seem to be a fix. Let’s continue discussion in the issue for now.
It doesn’t “seem[sic]” to fix the issue?
What issue? The code before this patch has undefined behavior. It can do anything, but it doesn’t have to. It could do nothing.The first sentence in your comment only makes sense in a vacuum. The standard is a thing. I agree with the second part. Let’s.
-
maflcko commented at 7:42 pm on November 20, 2022: memberThe burden to prepare, explain and motivate a change for reviewers is on the author. You created a one-line patch in 4 commits, ignored previous discussions, ignored two review comments, with no apparent progress in about a month. I closed this for now, because it can’t be merged according to the guidelines. At a minimum for this simple one line change, you’ll have to create at most one commit, with an explanation, and you’ll have to reply to review comments. All of this is explained in https://github.com/bitcoin/bitcoin/blob/master/CONTRIBUTING.md
-
bitcoin locked this on Nov 20, 2023
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2025-08-14 00:12 UTC
More mirrored repositories can be found on mirror.b10c.me