Hello Kudu Jenkins,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/4535
to look at the new patch set (#2).
Change subject: cache: fix behavior on single-CPU systems
......................................................................
cache: fix behavior on single-CPU systems
On a system with only a single CPU, shard_bits_ would be set to 0. This
would then result in calculating 'hash >> (32 - 0)' which is undefined
behavior. With optimizations, this would turn into a no-op, and we'd end
up using the whole hash as the shard index, instead of 0, causing a
crash.
The fix is to widen the hash to uint64_t before shifting.
Tested by manually making NumCPUs return 1 and running cache-test.
Change-Id: I7809e5697df657a589b2ceae5c6d4edbf161b52a
---
M src/kudu/util/cache.cc
1 file changed, 3 insertions(+), 1 deletion(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/35/4535/2
--
To view, visit http://gerrit.cloudera.org:8080/4535
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I7809e5697df657a589b2ceae5c6d4edbf161b52a
Gerrit-PatchSet: 2
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <[email protected]>
Gerrit-Reviewer: Adar Dembo <[email protected]>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Marcel Kornacker <[email protected]>