mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-20 08:40:50 +00:00
do not trigger allocator to return null under sanitizers
This commit is contained in:
parent
128e1fec3d
commit
f8480c26e7
@ -269,6 +269,7 @@ TEST(MemoryResizeTest, AlignmentWithRealAllocator)
|
|||||||
ASSERT_EQ(memory.m_size, 1);
|
ASSERT_EQ(memory.m_size, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if !defined(ADDRESS_SANITIZER) && !defined(THREAD_SANITIZER) && !defined(MEMORY_SANITIZER) && !defined(UNDEFINED_BEHAVIOR_SANITIZER)
|
||||||
{
|
{
|
||||||
auto memory = Memory<>(0, 10); // not the power of 2
|
auto memory = Memory<>(0, 10); // not the power of 2
|
||||||
ASSERT_EQ(memory.m_data, nullptr);
|
ASSERT_EQ(memory.m_data, nullptr);
|
||||||
@ -280,6 +281,7 @@ TEST(MemoryResizeTest, AlignmentWithRealAllocator)
|
|||||||
ASSERT_EQ(memory.m_capacity, 0);
|
ASSERT_EQ(memory.m_capacity, 0);
|
||||||
ASSERT_EQ(memory.m_size, 0);
|
ASSERT_EQ(memory.m_size, 0);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
{
|
{
|
||||||
auto memory = Memory<>(0, 32);
|
auto memory = Memory<>(0, 32);
|
||||||
|
Loading…
Reference in New Issue
Block a user