mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2025-05-10 18:05:44 +02:00
fix(ci): malloc trim on sanitizers workflow (#2794)
* remove malloc_trim from sanitizers build
This commit is contained in:
parent
9e23f85e6b
commit
7d093460f0
2 changed files with 8 additions and 0 deletions
|
@ -61,6 +61,10 @@ if (PRINT_STACKTRACES_ON_SIGNAL)
|
|||
target_compile_definitions(dragonfly_lib PRIVATE PRINT_STACKTRACES_ON_SIGNAL)
|
||||
endif()
|
||||
|
||||
if (WITH_ASAN OR WITH_USAN)
|
||||
target_compile_definitions(dfly_transaction PRIVATE SANITIZERS)
|
||||
endif()
|
||||
|
||||
find_library(ZSTD_LIB NAMES libzstd.a libzstdstatic.a zstd NAMES_PER_DIR REQUIRED)
|
||||
|
||||
cxx_link(dfly_transaction dfly_core strings_lib TRDP::fast_float)
|
||||
|
|
|
@ -166,7 +166,11 @@ void ServerState::DecommitMemory(uint8_t flags) {
|
|||
// trims the memory (reduces RSS usage) from the malloc allocator. Does not present in
|
||||
// MUSL lib.
|
||||
#ifdef __GLIBC__
|
||||
// There is an issue with malloc_trim and sanitizers because the asan replace malloc but is not
|
||||
// aware of malloc_trim which causes malloc_trim to segfault because it's not initialized properly
|
||||
#ifndef SANITIZERS
|
||||
malloc_trim(0);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue