Dan Burkert has submitted this change and it was merged.

Change subject: KuduPredicate::Clone on IN list predicate causes segfault
......................................................................


KuduPredicate::Clone on IN list predicate causes segfault

Jordan Birdsell uncovered this issue where a cloned IN list predicate
causes a segfault when applied to a scanner. During the clone, the
values list was being 'preallocated' using the vector(int) constructor,
which adds a bunch of default constructed values (in this case, nullptrs
since the type is const void*). We previously didn't have any test
coverage of the Clone method, so I added a check to every column
predicate test to make sure that scans with cloned predicates behave the
same as the original predicates. The test segfaults without the fix.

Change-Id: I977691390535273c37aa90c3a3663a7c09ea67fc
Reviewed-on: http://gerrit.cloudera.org:8080/4568
Reviewed-by: Adar Dembo <a...@cloudera.com>
Tested-by: Kudu Jenkins
Reviewed-by: Jordan Birdsell <jordantbirds...@gmail.com>
---
M src/kudu/client/predicate-test.cc
M src/kudu/client/scan_predicate-internal.h
2 files changed, 21 insertions(+), 3 deletions(-)

Approvals:
  Jordan Birdsell: Looks good to me, but someone else must approve
  Adar Dembo: Looks good to me, approved
  Kudu Jenkins: Verified



-- 
To view, visit http://gerrit.cloudera.org:8080/4568
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I977691390535273c37aa90c3a3663a7c09ea67fc
Gerrit-PatchSet: 2
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Dan Burkert <d...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <a...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <d...@cloudera.com>
Gerrit-Reviewer: Jordan Birdsell <jordantbirds...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins

Reply via email to