In the MMIX LCG calculation, the right side calculation underlying type
is signed. This causes the undefined behavior sanitizer to detect a
signed integer overflow.
This diff sets the constants to unsigned long long to enforce the
underlying type to be unsigned and get rid of this error.
Details
Details
- Reviewers
deadalnix markblundeberg - Group Reviewers
Restricted Project - Commits
- rSTAGINGd478be9e220e: Fix undefined behavior in avalanche.cpp
rABCd478be9e220e: Fix undefined behavior in avalanche.cpp
With the UBSAN activated, run
test_bitcoin -t avalanche_tests
Diff Detail
Diff Detail
- Repository
- rABC Bitcoin ABC
- Branch
- undefined_avalanche
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 5900 Build 9860: Bitcoin ABC Buildbot (legacy) Build 9859: arc lint + arc unit
Event Timeline
Comment Actions
If the problem is that nodeid is signed, then this is what needs fixing, not all the constants.