From 27872ca13c713c90cd5576722a3f672a73d4c9f6 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Sat, 11 Nov 2017 17:31:22 +0100 Subject: [PATCH] Add an empty assembly statement to the memzero() weak symbol --- src/libsodium/sodium/utils.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/libsodium/sodium/utils.c b/src/libsodium/sodium/utils.c index bb94fe88..2c6d7cdb 100644 --- a/src/libsodium/sodium/utils.c +++ b/src/libsodium/sodium/utils.c @@ -92,6 +92,9 @@ sodium_memzero(void *const pnt, const size_t len) #elif HAVE_WEAK_SYMBOLS memset(pnt, 0, len); _sodium_dummy_symbol_to_prevent_memzero_lto(pnt, len); +# ifdef HAVE_AMD64_ASM + __asm__ __volatile__ ("" : : "p"(pnt)); +# endif #else volatile unsigned char *volatile pnt_ = (volatile unsigned char *volatile) pnt;