-
Notifications
You must be signed in to change notification settings - Fork 37.8k
Remove txmempool implicit-integer-sign-change sanitizer suppressions #23957
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsReviewers, this pull request conflicts with the following ones:
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. |
Could we just avoid conversion from Lines 114 to 117 in 75a227e
int64_t ?
|
Yes, potentially. Though, the goal of this pull is to keep all integer widths and types the same, only make implicit conversions explicit for the reasons mentioned in OP. Also, changing the return type of |
I've checked that the binary doesn't change with |
A conversion sequence
Sure. ACK on |
Yes, this should be done in another PR. I briefly looked into this, but this touches policy and miner as well. (It is a bit of a can of worms like #23633) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK fa4314f, I have reviewed the code and it looks OK, I agree it can be merged.
Done in #23962. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK fa4314f
- I agree with the motivation of this PR.
A file-wide suppression is problematic because it will wave through future violations, potentially bugs.
- Checked that each variable is properly typecasted explicitly.
- Since the line
implicit-integer-sign-change:txmempool.cpp
has been removed from santizer_supression/urban list, and the CI passed successfully, that means as of now, there are no more variables in txmempool.cpp that requires explicit type conversion.
Thanks, closing this for now to avoid merge conflicts. |
A file-wide suppression is problematic because it will wave through future violations, potentially bugs.
Fix that by using per-statement casts.
This refactor doesn't change behavior because the now explicit casts were previously done implicitly.
Similar to commit 8b5a4de