aboutsummaryrefslogtreecommitdiff
path: root/src/crypto
diff options
context:
space:
mode:
authorRoss Nicoll <[email protected]>2021-06-18 08:27:39 +0100
committerRoss Nicoll <[email protected]>2021-07-09 22:06:26 +0100
commitc93261586d691c5d5394cd26720723300f3b7d1f (patch)
tree1c85ff01d7ee4cd41e07ab951f8ad4ec7c525af6 /src/crypto
parentReplace HMAC_SHA256 with Bitcoin's version (diff)
downloaddiscoin-c93261586d691c5d5394cd26720723300f3b7d1f.tar.xz
discoin-c93261586d691c5d5394cd26720723300f3b7d1f.zip
Ignore unsigned overflow warnings
Ignore unsigned overflow warnings in: * Scrypt hash calculation as this is an intentional part of how they behave. * Calculating block subsidy as the Mersenne Twister intentionally expects this behaviour.
Diffstat (limited to 'src/crypto')
-rw-r--r--src/crypto/scrypt.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/crypto/scrypt.cpp b/src/crypto/scrypt.cpp
index 9d9721fe5..422aa59c0 100644
--- a/src/crypto/scrypt.cpp
+++ b/src/crypto/scrypt.cpp
@@ -119,6 +119,9 @@ PBKDF2_SHA256(const uint8_t *passwd, size_t passwdlen, const uint8_t *salt,
#define ROTL(a, b) (((a) << (b)) | ((a) >> (32 - (b))))
+#ifdef __clang__
+__attribute__((no_sanitize("unsigned-integer-overflow")))
+#endif // __clang__
static inline void xor_salsa8(uint32_t B[16], const uint32_t Bx[16])
{
uint32_t x00,x01,x02,x03,x04,x05,x06,x07,x08,x09,x10,x11,x12,x13,x14,x15;