]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
memleaktest with MSVC's AddressSanitizer
authorKevin Cadieux <kevca@microsoft.com>
Fri, 19 Mar 2021 20:54:05 +0000 (13:54 -0700)
committerTomas Mraz <tomas@openssl.org>
Wed, 28 Apr 2021 09:37:32 +0000 (11:37 +0200)
Disabling memleaktest under MSVC because leak detection is not a supported feature with MSVC's AddressSanitizer. Leaving ASan enabled in this case causes a test failure because the test suite is expecting the leak to be detected.

CLA: trivial

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14581)

test/memleaktest.c

index 1e07723a6f15b6b25d6c05b67aa024d3e55815da..b48dbced0d416e787b629d9fe4be3470a4a25c87 100644 (file)
 # endif
 #endif
 /* If __SANITIZE_ADDRESS__ isn't defined, define it to be false */
-#ifndef __SANITIZE_ADDRESS__
+/* Leak detection is not yet supported with MSVC on Windows, so */
+/* set __SANITIZE_ADDRESS__ to false in this case as well.      */
+#if !defined(__SANITIZE_ADDRESS__) || defined(_MSC_VER)
+# undef __SANITIZE_ADDRESS__
 # define __SANITIZE_ADDRESS__ 0
 #endif