Dan Burkert has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/6637 )
Change subject: Add unsigned-integer overflow checking to UBSAN ...................................................................... Add unsigned-integer overflow checking to UBSAN Background: We recently found a very subtle bug caused by unsigned integer overflow in tablet_peer_mm_ops.cc (KUDU-2017). This patch was able to repro that overflow from at least two different unit tests, so the value is high. Additionally, it lets us be a little more aggressive about using unsigned integers. I've never been much of a fan of the style guide's ban. A bunch of the overflow instances are expected, like hash functions and random number generators. A few bugs were exposed, including a missing statement in Schema::swap, and an accounting error in the thread manager (fixed in a preceding commit). Change-Id: Ib0712f5307dcbab7fdffbe2364e1fdb691d3aaab Reviewed-on: http://gerrit.cloudera.org:8080/6637 Reviewed-by: Todd Lipcon <[email protected]> Tested-by: Kudu Jenkins --- M CMakeLists.txt A build-support/ubsan-blacklist.txt M src/kudu/cfile/cfile-test-base.h M src/kudu/cfile/index_btree.cc M src/kudu/clock/hybrid_clock-test.cc M src/kudu/clock/hybrid_clock.cc M src/kudu/common/key_util.cc M src/kudu/common/partition.cc M src/kudu/common/schema.cc M src/kudu/consensus/raft_consensus_quorum-test.cc M src/kudu/gutil/dynamic_annotations.h M src/kudu/gutil/hash/city.cc M src/kudu/gutil/hash/hash128to64.h M src/kudu/gutil/hash/jenkins.cc M src/kudu/gutil/hash/jenkins_lookup2.h M src/kudu/gutil/port.h M src/kudu/gutil/spinlock_internal.cc M src/kudu/gutil/strings/fastmem.h M src/kudu/gutil/strings/numbers.cc M src/kudu/integration-tests/alter_table-randomized-test.cc M src/kudu/integration-tests/linked_list-test-util.h M src/kudu/tablet/mt-tablet-test.cc M src/kudu/util/alignment.h M src/kudu/util/bit-stream-utils.inline.h M src/kudu/util/bitmap-test.cc M src/kudu/util/bloom_filter.h M src/kudu/util/debug-util.cc M src/kudu/util/debug/trace_event_impl.cc M src/kudu/util/hash_util.h M src/kudu/util/memory/overwrite.cc M src/kudu/util/random_util.cc M src/kudu/util/rle-encoding.h M src/kudu/util/stopwatch.h M src/kudu/util/threadpool.cc 34 files changed, 174 insertions(+), 58 deletions(-) Approvals: Todd Lipcon: Looks good to me, approved Kudu Jenkins: Verified -- To view, visit http://gerrit.cloudera.org:8080/6637 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ib0712f5307dcbab7fdffbe2364e1fdb691d3aaab Gerrit-Change-Number: 6637 Gerrit-PatchSet: 6 Gerrit-Owner: Dan Burkert <[email protected]> Gerrit-Reviewer: Adar Dembo <[email protected]> Gerrit-Reviewer: Dan Burkert <[email protected]> Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Todd Lipcon <[email protected]>
