mirror of
https://github.com/isar/libmdbx.git
synced 2025-08-23 09:04:26 +08:00
mdbx: поддержка ASAN (Address Sanitizer) при сборке посредством MSVC.
This commit is contained in:
committed by
Леонид Юрьев (Leonid Yuriev)
parent
359489e271
commit
6d74b10db1
@@ -25654,7 +25654,10 @@ __dll_export
|
||||
};
|
||||
|
||||
#ifdef __SANITIZE_ADDRESS__
|
||||
LIBMDBX_API __attribute__((__weak__)) const char *__asan_default_options(void) {
|
||||
#if !defined(_MSC_VER) || __has_attribute(weak)
|
||||
LIBMDBX_API __attribute__((__weak__))
|
||||
#endif
|
||||
const char *__asan_default_options(void) {
|
||||
return "symbolize=1:allow_addr2line=1:"
|
||||
#if MDBX_DEBUG
|
||||
"debug=1:"
|
||||
|
@@ -14,6 +14,12 @@
|
||||
#define __USE_MINGW_ANSI_STDIO 1
|
||||
#endif /* MinGW */
|
||||
|
||||
/* Workaround for MSVC' header `extern "C"` vs `std::` redefinition bug */
|
||||
#if defined(_MSC_VER) && defined(__SANITIZE_ADDRESS__) && \
|
||||
!defined(_DISABLE_VECTOR_ANNOTATION)
|
||||
#define _DISABLE_VECTOR_ANNOTATION
|
||||
#endif /* _DISABLE_VECTOR_ANNOTATION */
|
||||
|
||||
#include "../mdbx.h++"
|
||||
|
||||
#include "internals.h"
|
||||
|
Reference in New Issue
Block a user