Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/boringssl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNico Weber <thakis@chromium.org>2016-06-16 11:12:05 +0300
committerDavid Benjamin <davidben@google.com>2016-06-16 19:03:46 +0300
commit2b360714abf9395d85ac9b50850fcd2fc4bda442 (patch)
tree1aac70e318c721bc34648c6cca12c0501ac52fd8 /crypto/mem.c
parent80ef4333591db8eb79c654cb030142edeab181ce (diff)
win: Add an explicit intrin.h include to work around a clang-cl bug.
I did the same change in NaCl in https://codereview.chromium.org/2070533002/. I thought NaCl is the only place where this was needed, but at least it's due to SecureZeroMemory() again. So it's two files now, but at least there's only one function we know of that needs this, and it's only called in three files total in all projects used by Chromium. BUG=chromium:592745 Change-Id: I07ed197869e26ec70c1f4b75d91fd64abae5015e Reviewed-on: https://boringssl-review.googlesource.com/8320 Reviewed-by: David Benjamin <davidben@google.com>
Diffstat (limited to 'crypto/mem.c')
-rw-r--r--crypto/mem.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/crypto/mem.c b/crypto/mem.c
index ca4c5593..f44e90fb 100644
--- a/crypto/mem.c
+++ b/crypto/mem.c
@@ -69,6 +69,14 @@
OPENSSL_MSVC_PRAGMA(warning(push, 3))
#include <windows.h>
OPENSSL_MSVC_PRAGMA(warning(pop))
+
+/* Work around a clang-cl bug: SecureZeroMemory() below uses __stosb() but
+ * windows.h only declares that intrinsic and then uses `#pragma intrinsic` for
+ * it. clang-cl doesn't implement `#pragma intrinsic` yet; it instead defines
+ * the function as an always-inline symbol in its intrin.h.
+ * TODO(thakis): Remove this once http://llvm.org/PR19898 is fixed.
+ */
+#include <intrin.h>
#else
#include <strings.h>
#endif