mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-02 00:44:12 +08:00
mdbx: add default AddressSanitizer options.
Change-Id: I99b7aee5010f1d43008b2a61efe3fb9bb023ab31
This commit is contained in:
parent
e3fcc4754e
commit
0047ce4bd6
22
src/mdbx.c
22
src/mdbx.c
@ -11225,3 +11225,25 @@ int mdbx_set_attr(MDBX_txn *txn, MDBX_dbi dbi, MDBX_val *key, MDBX_val *data,
|
||||
txn->mt_cursors[dbi] = mc.mc_next;
|
||||
return rc;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
#ifdef __SANITIZE_ADDRESS__
|
||||
LIBMDBX_API __attribute__((weak)) const char *__asan_default_options() {
|
||||
return "symbolize=1:allow_addr2line=1:"
|
||||
#ifdef _DEBUG
|
||||
"debug=1:"
|
||||
#endif /* _DEBUG */
|
||||
"report_globals=1:"
|
||||
"replace_str=1:replace_intrin=1:"
|
||||
"malloc_context_size=9:"
|
||||
"detect_leaks=1:"
|
||||
"check_printf=1:"
|
||||
"detect_deadlocks=1:"
|
||||
"check_initialization_order=1:"
|
||||
"detect_stack_use_after_return=1:"
|
||||
"intercept_tls_get_addr=1:"
|
||||
"decorate_proc_maps=1:"
|
||||
"abort_on_error=1";
|
||||
}
|
||||
#endif /* __SANITIZE_ADDRESS__ */
|
||||
|
@ -93,8 +93,10 @@
|
||||
nameless struct / union */
|
||||
#pragma warning(disable : 4127) /* conditional expression is constant */
|
||||
#if _MSC_VER < 1900
|
||||
#pragma warning(disable : 4510) /* default constructor could not be generated */
|
||||
#pragma warning(disable : 4512) /* assignment operator could not be generated */
|
||||
#pragma warning(disable : 4510) /* default constructor could \
|
||||
not be generated */
|
||||
#pragma warning(disable : 4512) /* assignment operator could \
|
||||
not be generated */
|
||||
#pragma warning(disable : 4610) /* user-defined constructor required */
|
||||
#define snprintf _snprintf
|
||||
#pragma warning(disable : 4996) /* 'vsnprintf': This function or variable \
|
||||
|
Loading…
x
Reference in New Issue
Block a user