crypto: remove kBoringSSLBinaryTag
This was never updated and not in use. Remove this to simplify the code
and avoid an issue on ARM64 Windows.
~~~
D:\a\firebase-cpp-sdk\firebase-cpp-sdk\BinaryCache\firebase\external\src\boringssl\crypto\mem.c(152): error C2220: the following warning is treated as an error
D:\a\firebase-cpp-sdk\firebase-cpp-sdk\BinaryCache\firebase\external\src\boringssl\crypto\mem.c(152): warning C4746: volatile access of 'kBoringSSLBinaryTag' is subject to /volatile:<iso|ms> setting; consider using __iso_volatile_load/store intrinsic functions
~~~
Change-Id: Iedb0999e38c769add5bb1d5623e038b17f8f245f
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/63325
Reviewed-by: David Benjamin <davidben@google.com>
Reviewed-by: Adam Langley <agl@google.com>
Commit-Queue: Adam Langley <agl@google.com>
diff --git a/crypto/mem.c b/crypto/mem.c
index 5609224..9e81476 100644
--- a/crypto/mem.c
+++ b/crypto/mem.c
@@ -133,31 +133,6 @@
WEAK_SYMBOL_FUNC(void, OPENSSL_memory_free, (void *ptr));
WEAK_SYMBOL_FUNC(size_t, OPENSSL_memory_get_size, (void *ptr));
-// kBoringSSLBinaryTag is a distinctive byte sequence to identify binaries that
-// are linking in BoringSSL and, roughly, what version they are using.
-static const uint8_t kBoringSSLBinaryTag[18] = {
- // 16 bytes of magic tag.
- 0x8c,
- 0x62,
- 0x20,
- 0x0b,
- 0xd2,
- 0xa0,
- 0x72,
- 0x58,
- 0x44,
- 0xa8,
- 0x96,
- 0x69,
- 0xad,
- 0x55,
- 0x7e,
- 0xec,
- // Current source iteration. Incremented ~monthly.
- 3,
- 0,
-};
-
#if defined(BORINGSSL_MALLOC_FAILURE_TESTING)
static CRYPTO_MUTEX malloc_failure_lock = CRYPTO_MUTEX_INIT;
static uint64_t current_malloc_count = 0;
@@ -240,14 +215,6 @@
}
if (size + OPENSSL_MALLOC_PREFIX < size) {
- // |OPENSSL_malloc| is a central function in BoringSSL thus a reference to
- // |kBoringSSLBinaryTag| is created here so that the tag isn't discarded by
- // the linker. The following is sufficient to stop GCC, Clang, and MSVC
- // optimising away the reference at the time of writing. Since this
- // probably results in an actual memory reference, it is put in this very
- // rare code path.
- uint8_t unused = *(volatile uint8_t *)kBoringSSLBinaryTag;
- (void) unused;
goto err;
}