libmicrohttpd2

HTTP server C library (MHD 2.x, alpha)
Log | Files | Refs | README | LICENSE

commit 5c591ebf9bac6f099653682f532d41b9883d7284
parent 5aecfb4319c42788f1147ed02c6a40374cc2776d
Author: Evgeny Grin (Karlson2k) <k2k@drgrin.dev>
Date:   Sun,  1 Mar 2026 15:07:40 +0100

Fixed ASan failure (with clang)

Diffstat:
Msrc/incl_priv/mhd_sys_options.h | 16++++++++--------
Msrc/mhd2/h2/hpack/mhd_hpack_codec.c | 4++--
2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/src/incl_priv/mhd_sys_options.h b/src/incl_priv/mhd_sys_options.h @@ -571,14 +571,14 @@ #endif #ifndef MHD_ASAN_ACTIVE -#if (defined(__GNUC__) || defined(_MSC_VER)) && defined(__SANITIZE_ADDRESS__) -#define MHD_ASAN_ACTIVE 1 -#elif defined(__has_feature) -#if __has_feature (address_sanitizer) -#define MHD_ASAN_ACTIVE 1 -#endif /* __has_feature(address_sanitizer) */ -#endif /* __has_feature */ -#endif /* MHD_ASAN_ACTIVE */ +# ifdef __SANITIZE_ADDRESS__ +# define MHD_ASAN_ACTIVE 1 +# elif defined(__has_feature) +# if __has_feature (address_sanitizer) +# define MHD_ASAN_ACTIVE 1 +# endif /* __has_feature(address_sanitizer) */ +# endif /* __has_feature */ +#endif /* ! MHD_ASAN_ACTIVE */ #if defined(MHD_ASAN_ACTIVE) && defined(HAVE_SANITIZER_ASAN_INTERFACE_H) && \ (defined(FUNC_PTRCOMPARE_CAST_WORKAROUND_WORKS) || \ diff --git a/src/mhd2/h2/hpack/mhd_hpack_codec.c b/src/mhd2/h2/hpack/mhd_hpack_codec.c @@ -1971,7 +1971,7 @@ dtbl_new_entry_copy_entr_strs ( { char *const strs_buff = dtbl_get_strs_buff (dyn); -#ifndef __SANITIZE_ADDRESS__ +#ifndef MHD_ASAN_ACTIVE # ifdef HAVE_UINTPTR_T /* The new entry must not be in the table */ mhd_assert (dtbl_is_empty (dyn) || @@ -1980,7 +1980,7 @@ dtbl_new_entry_copy_entr_strs ( (((uintptr_t) (const void*) dtbl_zero_entry_infoc (dyn)) > \ (uintptr_t) (const void*) new_entry)); # endif /* HAVE_UINTPTR_T */ -#endif /* ! __SANITIZE_ADDRESS__*/ +#endif /* ! MHD_ASAN_ACTIVE*/ #ifndef NDEBUG if (1)