Skip to content

Commit 9d113df

Browse files
xyliganSerejaMatveev Sergei
andauthored
fixing the ASan crash (#29169)
Co-authored-by: Matveev Sergei <xyligansereja@yandex-team.ru>
1 parent 31af804 commit 9d113df

File tree

1 file changed

+8
-1
lines changed
  • ydb/core/tx/columnshard/engines/predicate

1 file changed

+8
-1
lines changed

ydb/core/tx/columnshard/engines/predicate/filter.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
#include <ydb/library/actors/core/log.h>
77
#include <ydb/library/formats/arrow/switch/switch_type.h>
8+
#include <type_traits>
89

910
namespace NKikimr::NOlap {
1011

@@ -281,8 +282,14 @@ TConclusion<TPKRangesFilter> TRangesBuilder::Finish() {
281282
namespace {
282283
template <typename T>
283284
TCell MakeDefaultCellByPrimitiveType() {
284-
return TCell::Make<T>(T());
285+
if constexpr (sizeof(T) <= TCell::MaxInlineSize()) {
286+
return TCell::Make<T>(T());
287+
} else {
288+
alignas(T) static const T kDefault{};
289+
return TCell(reinterpret_cast<const char*>(&kDefault), sizeof(T));
290+
}
285291
}
292+
286293
} // namespace
287294

288295
TConclusion<TCell> TRangesBuilder::MakeDefaultCell(const NScheme::TTypeInfo typeInfo) {

0 commit comments

Comments
 (0)