aboutsummaryrefslogtreecommitdiff
path: root/src/include/mhd_options.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/mhd_options.h')
-rw-r--r--src/include/mhd_options.h27
1 files changed, 26 insertions, 1 deletions
diff --git a/src/include/mhd_options.h b/src/include/mhd_options.h
index 0e803451..e405fd23 100644
--- a/src/include/mhd_options.h
+++ b/src/include/mhd_options.h
@@ -1,6 +1,6 @@
1/* 1/*
2 This file is part of libmicrohttpd 2 This file is part of libmicrohttpd
3 Copyright (C) 2016 Karlson2k (Evgeny Grin) 3 Copyright (C) 2016-2021 Karlson2k (Evgeny Grin)
4 4
5 This library is free software; you can redistribute it and/or 5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public 6 modify it under the terms of the GNU Lesser General Public
@@ -142,4 +142,29 @@
142#define MHD_FAVOR_FAST_CODE 1 142#define MHD_FAVOR_FAST_CODE 1
143#endif /* !MHD_FAVOR_FAST_CODE && !MHD_FAVOR_SMALL_CODE */ 143#endif /* !MHD_FAVOR_FAST_CODE && !MHD_FAVOR_SMALL_CODE */
144 144
145#ifndef MHD_ASAN_ACTIVE
146#if (defined(__GNUC__) || defined(_MSC_VER)) && defined(__SANITIZE_ADDRESS__)
147#define MHD_ASAN_ACTIVE 1
148#elif defined(__has_feature)
149#if __has_feature (address_sanitizer)
150#define MHD_ASAN_ACTIVE 1
151#endif /* __has_feature(address_sanitizer) */
152#endif /* __has_feature */
153#endif /* MHD_ASAN_ACTIVE */
154
155#if defined(MHD_ASAN_ACTIVE) && defined(HAVE_SANITIZER_ASAN_INTERFACE_H) && \
156 (defined(FUNC_ATTR_PTRCOMPARE_WOKRS) || defined(FUNC_ATTR_NOSANITIZE_WORKS))
157#ifndef MHD_ASAN_POISON_ACTIVE
158/* Manual ASAN poisoning could be used */
159#warning User memory poisoning is not active
160#endif /* ! MHD_ASAN_POISON_ACTIVE */
161#define _MHD_USE_ASAN_POISON 1
162#else /* ! (MHD_ASAN_ACTIVE && HAVE_SANITIZER_ASAN_INTERFACE_H &&
163 (FUNC_ATTR_PTRCOMPARE_WOKRS || FUNC_ATTR_NOSANITIZE_WORKS)) */
164#ifdef MHD_ASAN_POISON_ACTIVE
165#error User memory poisoning is active, but conditions are not suitable
166#endif /* MHD_ASAN_POISON_ACTIVE */
167#endif /* ! (MHD_ASAN_ACTIVE && HAVE_SANITIZER_ASAN_INTERFACE_H &&
168 (FUNC_ATTR_PTRCOMPARE_WOKRS || FUNC_ATTR_NOSANITIZE_WORKS)) */
169
145#endif /* MHD_OPTIONS_H */ 170#endif /* MHD_OPTIONS_H */