File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -61,6 +61,10 @@ if (PRINT_STACKTRACES_ON_SIGNAL)
61
61
target_compile_definitions (dragonfly_lib PRIVATE PRINT_STACKTRACES_ON_SIGNAL )
62
62
endif ()
63
63
64
+ if (WITH_ASAN OR WITH_USAN )
65
+ target_compile_definitions (dfly_transaction PRIVATE SANITIZERS )
66
+ endif ()
67
+
64
68
find_library (ZSTD_LIB NAMES libzstd.a libzstdstatic.a zstd NAMES_PER_DIR REQUIRED )
65
69
66
70
cxx_link (dfly_transaction dfly_core strings_lib TRDP::fast_float )
Original file line number Diff line number Diff line change @@ -166,7 +166,11 @@ void ServerState::DecommitMemory(uint8_t flags) {
166
166
// trims the memory (reduces RSS usage) from the malloc allocator. Does not present in
167
167
// MUSL lib.
168
168
#ifdef __GLIBC__
169
+ // There is an issue with malloc_trim and sanitizers because the asan replace malloc but is not
170
+ // aware of malloc_trim which causes malloc_trim to segfault because it's not initialized properly
171
+ #ifndef SANITIZERS
169
172
malloc_trim (0 );
173
+ #endif
170
174
#endif
171
175
}
172
176
}
You can’t perform that action at this time.
0 commit comments