123456789101112131415161718192021222324252627282930313233 |
- diff --git a/kmp_alloc.cpp b/kmp_alloc.cpp
- index 21518c9..c966fa6 100644
- --- a/kmp_alloc.cpp
- +++ b/kmp_alloc.cpp
- @@ -17,6 +17,18 @@
- #include "kmp_io.h"
- #include "kmp_wrapper_malloc.h"
- +#ifdef __clang__
- +#if __has_feature(address_sanitizer)
- +extern "C" { // sanitizers API
- +void __lsan_ignore_object(const void* p);
- +}
- +#else
- +#define __lsan_ignore_object(p)
- +#endif
- +#else
- +#define __lsan_ignore_object(p)
- +#endif
- +
- // Disable bget when it is not used
- #if KMP_USE_BGET
-
- @@ -1862,6 +1862,9 @@ static void *___kmp_allocate_align(size_t size,
- #else
- descr.ptr_allocated = malloc_src_loc(descr.size_allocated KMP_SRC_LOC_PARM);
- #endif
- +
- + __lsan_ignore_object(descr.ptr_allocated); // espetrov@yandex-team.ru: asan considers descr.ptr_allocated leaked because of address alignment arithmetics
- +
- KE_TRACE(10, (" malloc( %d ) returned %p\n", (int)descr.size_allocated,
- descr.ptr_allocated));
- if (descr.ptr_allocated == NULL) {
|