wangbo commented on a change in pull request #1816: v2 segment support string 
encode(#1766)
URL: https://github.com/apache/incubator-doris/pull/1816#discussion_r325452668
 
 

 ##########
 File path: be/src/util/arena.cpp
 ##########
 @@ -59,6 +60,7 @@ char* Arena::AllocateAligned(size_t bytes) {
 
 char* Arena::AllocateNewBlock(size_t block_bytes) {
     char* result = new char[block_bytes];
+    memset(result, 0, block_bytes);
 
 Review comment:
   initialing column_zone_map.max_value will call this method for allocating 
memory,and then column_zone_map.max_value will be reinterpret_cast to 
slice(FieldTypeTraits<OLAP_FIELD_TYPE_CHAR>.set_to_min,types.h),if not set to 
0,the slice.size value will be unknown(usually very large value), it will cause 
core dump;
   maybe I  cast column_zone_map.max_value to slice and set to 0 instead of  
memset to 0 is better

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to