Skip to content

Conversation

jonatack
Copy link
Member

@jonatack jonatack commented Jul 28, 2020

Credit to Crypt-iQ for finding and reporting the UBSan implicit-integer-sign-change issue and to vasild for the original review suggestion in #19590 (review).

Closes #19678.

@DrahtBot
Copy link
Contributor

DrahtBot commented Jul 28, 2020

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

Conflicts

Reviewers, 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.

laanwj added a commit that referenced this pull request Jul 30, 2020
…use in net processing

c251d71 p2p, refactoring: use CInv helpers in net_processing.cpp (Jon Atack)
4254cd9 p2p: add CInv transaction message helper methods (Jon Atack)

Pull request description:

  Following the merge of wtxid relay in #18044, this is the first of three refactoring PRs (this one, #19610, and #19611) with no change in behavior, tightly scoped to ease review, to simplify the net processing code and improve encapsulation:

  - add `CInv` transaction message helper methods, defined in the class

  - use the new helpers in `net_processing.cpp` to simplify the code and improve encapsulation

  Test coverage is provided by the functional p2p tests, notably (from seeing which tests failed when breaking things to test coverage) `p2p_segwit`, `p2p_tx_download`, `p2p_feefilter`, and `p2p_permissions`.

ACKs for top commit:
  fjahr:
    Code review ACK c251d71
  laanwj:
    Code review ACK c251d71
  vasild:
    ACK c251d71
  theStack:
    Code-Review ACK c251d71
  hebasto:
    ACK c251d71, I have reviewed the code and it looks OK, I agree it can be merged.

Tree-SHA512: ead034b3c9e438909b4c5010c570d7930e69063c114290b051b7cebfd9bd5b19f573218bebe8a521256d32e830797f997adad3d85b4539c64ac5762b698e656d
@jonatack jonatack force-pushed the CInv-type-refactoring branch from 3d0ce13 to 8a4cbef Compare July 30, 2020 15:58
@jonatack
Copy link
Member Author

Rebased on merged #19590.

sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Jul 31, 2020
…lpers; use in net processing

c251d71 p2p, refactoring: use CInv helpers in net_processing.cpp (Jon Atack)
4254cd9 p2p: add CInv transaction message helper methods (Jon Atack)

Pull request description:

  Following the merge of wtxid relay in bitcoin#18044, this is the first of three refactoring PRs (this one, bitcoin#19610, and bitcoin#19611) with no change in behavior, tightly scoped to ease review, to simplify the net processing code and improve encapsulation:

  - add `CInv` transaction message helper methods, defined in the class

  - use the new helpers in `net_processing.cpp` to simplify the code and improve encapsulation

  Test coverage is provided by the functional p2p tests, notably (from seeing which tests failed when breaking things to test coverage) `p2p_segwit`, `p2p_tx_download`, `p2p_feefilter`, and `p2p_permissions`.

ACKs for top commit:
  fjahr:
    Code review ACK c251d71
  laanwj:
    Code review ACK c251d71
  vasild:
    ACK c251d71
  theStack:
    Code-Review ACK c251d71
  hebasto:
    ACK c251d71, I have reviewed the code and it looks OK, I agree it can be merged.

Tree-SHA512: ead034b3c9e438909b4c5010c570d7930e69063c114290b051b7cebfd9bd5b19f573218bebe8a521256d32e830797f997adad3d85b4539c64ac5762b698e656d
@jonatack
Copy link
Member Author

jonatack commented Aug 3, 2020

Thanks for reviewing @vasild! Appreciated. This PR is still being updated pending merge of #19610, so don't hesitate to ACK there.

@jonatack jonatack force-pushed the CInv-type-refactoring branch from 8a4cbef to fc02bf0 Compare August 4, 2020 14:57
@jonatack jonatack force-pushed the CInv-type-refactoring branch from fc02bf0 to ec5fc3f Compare August 4, 2020 15:32
@jonatack jonatack force-pushed the CInv-type-refactoring branch from ec5fc3f to 83de92e Compare August 4, 2020 16:09
@jonatack
Copy link
Member Author

jonatack commented Aug 8, 2020

These changes are now all in #19610, so this can be closed for now.

@jonatack jonatack closed this Aug 8, 2020
@jonatack jonatack changed the title p2p: refactor CInv::type from public int to private uint32_t p2p: change CInv::type from int to uint32_t to fix UBSan warning Aug 27, 2020
@jonatack jonatack changed the title p2p: change CInv::type from int to uint32_t to fix UBSan warning p2p: change CInv::type from int to uint32_t, fix UBSan warning Aug 27, 2020
@jonatack
Copy link
Member Author

jonatack commented Aug 27, 2020

Tried to re-open this PR with an updated version, but apparently after a rebase/force-push on a closed PR, GitHub requires a new PR to be opened.

@jonatack
Copy link
Member Author

Done in #19818.

@bitcoin bitcoin locked as resolved and limited conversation to collaborators Feb 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

UBSan warning when fuzzing with -fsanitize=integer
3 participants