aboutsummaryrefslogtreecommitdiff
path: root/ConfigureChecks.cmake
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2014-10-20 09:13:36 +0200
committerAndreas Schneider <asn@samba.org>2014-10-20 16:48:29 +0200
commitdb8edc87e6a1a771336d832a6da02c4760c74100 (patch)
tree98bd093ec792c0550d029d7df352e647c4a28c5e /ConfigureChecks.cmake
parent390cfbef05e42439f82d301752b74f8865f32225 (diff)
downloadsocket_wrapper-db8edc87e6a1a771336d832a6da02c4760c74100.tar.gz
socket_wrapper-db8edc87e6a1a771336d832a6da02c4760c74100.tar.xz
socket_wrapper-db8edc87e6a1a771336d832a6da02c4760c74100.zip
src: Add support for running with address sanitizer.
It address sanitzer will complain about our hack with variable function attributes. This disables the checking of it. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
Diffstat (limited to 'ConfigureChecks.cmake')
-rw-r--r--ConfigureChecks.cmake11
1 files changed, 11 insertions, 0 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake
index ea0a208..32cd9bb 100644
--- a/ConfigureChecks.cmake
+++ b/ConfigureChecks.cmake
@@ -194,6 +194,17 @@ int main(void) {
return 0;
}" HAVE_FUNCTION_ATTRIBUTE_FORMAT)
+check_c_source_compiles("
+void test_address_sanitizer_attribute(void) __attribute__((no_sanitize_address));
+
+void test_address_sanitizer_attribute(void)
+{
+ return;
+}
+
+int main(void) {
+ return 0;
+}" HAVE_ADDRESS_SANITIZER_ATTRIBUTE)
check_library_exists(dl dlopen "" HAVE_LIBDL)
if (HAVE_LIBDL)