You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@quickstep.apache.org by ji...@apache.org on 2016/06/09 06:24:43 UTC

incubator-quickstep git commit: Fix a potential segfault with CompressedBlockBuilder

Repository: incubator-quickstep
Updated Branches:
  refs/heads/fix-compressed-block-builder-tuple-values-not-owned [created] e95b312d6


Fix a potential segfault with CompressedBlockBuilder


Project: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/commit/e95b312d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/tree/e95b312d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/diff/e95b312d

Branch: refs/heads/fix-compressed-block-builder-tuple-values-not-owned
Commit: e95b312d665ea3e6b1353b62f1efca19c303d48e
Parents: 2d39b8e
Author: Jianqiao Zhu <ji...@cs.wisc.edu>
Authored: Thu Jun 9 00:43:16 2016 -0500
Committer: Jianqiao Zhu <ji...@cs.wisc.edu>
Committed: Thu Jun 9 00:43:16 2016 -0500

----------------------------------------------------------------------
 storage/CompressedBlockBuilder.cpp | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/e95b312d/storage/CompressedBlockBuilder.cpp
----------------------------------------------------------------------
diff --git a/storage/CompressedBlockBuilder.cpp b/storage/CompressedBlockBuilder.cpp
index 4a181eb..1ca0c07 100644
--- a/storage/CompressedBlockBuilder.cpp
+++ b/storage/CompressedBlockBuilder.cpp
@@ -321,6 +321,9 @@ void CompressedBlockBuilder::buildCompressedColumnStoreTupleStorageSubBlock(void
 bool CompressedBlockBuilder::addTupleInternal(Tuple *candidate_tuple) {
   DEBUG_ASSERT(candidate_tuple->size() == relation_.size());
 
+  // Ensure that the tuple is the owner of its values.
+  candidate_tuple->ensureLiteral();
+
   // Modify dictionaries and maximum integers to reflect the new tuple's
   // values. Keep track of what has changed in case a rollback is needed.
   vector<CompressionDictionaryBuilder*> modified_dictionaries;