GoGoWen commented on code in PR #26933: URL: https://github.com/apache/doris/pull/26933#discussion_r1392060226
########## be/src/util/bitmap_value.h: ########## @@ -1259,10 +1259,9 @@ class BitmapValue { } static std::string empty_bitmap() { - static BitmapValue bitmap; - std::string buf; - buf.resize(bitmap.getSizeInBytes()); - bitmap.write_to(buf.data()); + std::string buf(sizeof(BitmapValue), 0); Review Comment: BitmapValue::write_to will get a string with size 1 for empty BitmapValue, however the size 1 string will reinterpret to BitmapValue* back in ColumnComplexType::insert: void insert(const Field& x) override { const String& s = doris::vectorized::get<const String&>(x); data.push_back(*reinterpret_cast<const T*>(s.c_str())); } in data.push_back will goto BitmapValue copy constructor, as the _type is not first member in BitmapValue, cause access to an unknown memory location. -- 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. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org