summaryrefslogtreecommitdiff
path: root/src/crypto/mem.c
diff options
context:
space:
mode:
authorPete Bentley <prb@google.com>2019-08-09 14:24:27 +0000
committerPete Bentley <prb@google.com>2019-08-09 14:24:27 +0000
commita5c947b7c91bac52eeb5086507b67e52a59ef980 (patch)
tree3725c3e206175c177a448c50d41ad2c2589a07fa /src/crypto/mem.c
parent228bd6249d17f351ea66508b3ec3112ed1cbdf30 (diff)
downloadboringssl-a5c947b7c91bac52eeb5086507b67e52a59ef980.tar.gz
Revert "Revert "external/boringssl: Sync to 81080a729af568f7b5fde92b9170cc17065027c9.""
This reverts commit 228bd6249d17f351ea66508b3ec3112ed1cbdf30. Reason for revert: All fixes submitted for modules affected by the ENGINE_free API change. Change-Id: I30fafafa13ec0a6390f4a9211fbf3122a8b4865f
Diffstat (limited to 'src/crypto/mem.c')
-rw-r--r--src/crypto/mem.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/crypto/mem.c b/src/crypto/mem.c
index 14e0bdf3..0ca0e84f 100644
--- a/src/crypto/mem.c
+++ b/src/crypto/mem.c
@@ -79,7 +79,10 @@ static void __asan_poison_memory_region(const void *addr, size_t size) {}
static void __asan_unpoison_memory_region(const void *addr, size_t size) {}
#endif
-#if defined(__GNUC__) || defined(__clang__)
+// Windows doesn't really support weak symbols as of May 2019, and Clang on
+// Windows will emit strong symbols instead. See
+// https://bugs.llvm.org/show_bug.cgi?id=37598
+#if defined(__GNUC__) || (defined(__clang__) && !defined(_MSC_VER))
// sdallocx is a sized |free| function. By passing the size (which we happen to
// always know in BoringSSL), the malloc implementation can save work. We cannot
// depend on |sdallocx| being available so we declare a wrapper that falls back