You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "Dan Burkert (Code Review)" <ge...@cloudera.org> on 2018/01/18 01:21:54 UTC

[kudu-CR] WIP: Add unsigned-integer overflow checking to UBSAN

Hello Kudu Jenkins, Adar Dembo, Todd Lipcon, 

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/6637

to look at the new patch set (#2).

Change subject: WIP: Add unsigned-integer overflow checking to UBSAN
......................................................................

WIP: 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.

Analysis:

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
(currently unfixed).

Change-Id: Ib0712f5307dcbab7fdffbe2364e1fdb691d3aaab
---
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/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/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/thread.cc
M src/kudu/util/threadpool.cc
33 files changed, 139 insertions(+), 43 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/37/6637/2
-- 
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: newpatchset
Gerrit-Change-Id: Ib0712f5307dcbab7fdffbe2364e1fdb691d3aaab
Gerrit-Change-Number: 6637
Gerrit-PatchSet: 2
Gerrit-Owner: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>