Merge branch 'msvc-asan-build' into 'main'

glib-private: Fix MSVC build with AddressSanitizer

See merge request GNOME/glib!2293
This commit is contained in:
Philip Withnall 2021-10-18 12:09:44 +00:00
commit 6e2de8fcb5

View File

@ -23,8 +23,14 @@
#include "gstdioprivate.h"
/* gcc defines __SANITIZE_ADDRESS__, clang sets the address_sanitizer
* feature flag */
#if defined(__SANITIZE_ADDRESS__) || g_macro__has_feature(address_sanitizer)
* feature flag.
*
* MSVC defines __SANITIZE_ADDRESS__ as well when AddressSanitizer
* is enabled but __lsan_ignore_object() equivalent method is not supported
* See also
* https://docs.microsoft.com/en-us/cpp/sanitizers/asan-building?view=msvc-160
*/
#if !defined(_MSC_VER) && (defined(__SANITIZE_ADDRESS__) || g_macro__has_feature(address_sanitizer))
/*
* %_GLIB_ADDRESS_SANITIZER: