Hello Dan Burkert, Mike Percy, Adar Dembo,
I'd like you to do a code review. Please visit
http://gerrit.cloudera.org:8080/1789
to review the following change.
Change subject: KUDU-815. Fix UBSAN error on Schemas with no columns
......................................................................
KUDU-815. Fix UBSAN error on Schemas with no columns
This fixes a UBSAN error when calling .data() on an empty vector. In theory,
the C++11 standard allows this, but it appears that our libstdcxx
implementation ends up implementing it on top of vector::front(), which returns
a NULL reference in the case of an empty array. This is, of course, undefined
behavior.
Change-Id: Ie79a430d2478320cd18e67a4e328111fe9afad30
---
M src/kudu/common/schema.cc
1 file changed, 10 insertions(+), 3 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/89/1789/1
--
To view, visit http://gerrit.cloudera.org:8080/1789
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie79a430d2478320cd18e67a4e328111fe9afad30
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <[email protected]>
Gerrit-Reviewer: Adar Dembo <[email protected]>
Gerrit-Reviewer: Dan Burkert <[email protected]>
Gerrit-Reviewer: Mike Percy <[email protected]>