You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by li...@apache.org on 2020/07/22 01:33:55 UTC
[incubator-doris] branch master updated: [Bug] fix use-after-poison
bug in ut schema_change_test (#4118)
This is an automated email from the ASF dual-hosted git repository.
lichaoyong pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-doris.git
The following commit(s) were added to refs/heads/master by this push:
new 46c8c25 [Bug] fix use-after-poison bug in ut schema_change_test (#4118)
46c8c25 is described below
commit 46c8c250a6b437ff37f49a409f121cc2c1cc4f32
Author: HuangWei <hu...@apache.org>
AuthorDate: Wed Jul 22 09:33:41 2020 +0800
[Bug] fix use-after-poison bug in ut schema_change_test (#4118)
Using slice->data to create HyperLogLog, it will exec HyperLogLog(Slice(const char*)). Then Slice(const char*) will use strlen(data) to calc the size. But the slice in this unit test isn't a C-string. Need to use Slice.
---
be/test/olap/schema_change_test.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/be/test/olap/schema_change_test.cpp b/be/test/olap/schema_change_test.cpp
index 52a3dae..b8e2e46 100644
--- a/be/test/olap/schema_change_test.cpp
+++ b/be/test/olap/schema_change_test.cpp
@@ -875,7 +875,7 @@ TEST_F(TestColumn, ConvertCharToHLL) {
mutable_block.get_row(0, &mv_row_cursor);
auto dst_slice = reinterpret_cast<Slice*>(mv_row_cursor.cell_ptr(1));
- HyperLogLog hll(dst_slice->data);
+ HyperLogLog hll(*dst_slice);
ASSERT_EQ(hll.estimate_cardinality(), 1);
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org