summaryrefslogtreecommitdiff
path: root/rijndael.cpp
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2018-11-09 08:00:53 -0500
committerJeffrey Walton <noloader@gmail.com>2018-11-09 08:00:53 -0500
commit092309b26687a033e6d95de5cdf065b3ef8cb584 (patch)
treea45538f41bfb59e93bb1bf2426be9d8b54c5e7f7 /rijndael.cpp
parentaf9fb9d21eac2b088c16680a377b79d6a3aa41f5 (diff)
downloadcryptopp-git-092309b26687a033e6d95de5cdf065b3ef8cb584.tar.gz
Fix global optimization bug for ChaCha AVX2 under VS2017 (GH #735)
Also see https://github.com/weidai11/cryptopp/issues/649. The 649 issue is the one affecting AES. It appears to be the same problem.
Diffstat (limited to 'rijndael.cpp')
-rw-r--r--rijndael.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/rijndael.cpp b/rijndael.cpp
index f00cc277..3cc0a46b 100644
--- a/rijndael.cpp
+++ b/rijndael.cpp
@@ -88,10 +88,10 @@ being unloaded from L1 cache, until that round is finished.
#include "misc.h"
#include "cpu.h"
-// MSVC bug, still don't know how to fix it. TODO, figure out
-// when we can re-enable optimizations for MSVC. Also see
+// VS2017 and global optimization bug. TODO, figure out when
+// we can re-enable full optimizations for VS2017. Also see
// https://github.com/weidai11/cryptopp/issues/649
-#if defined(_MSC_VER) && (_MSC_VER >= 1910)
+#if (_MSC_VER >= 1910) && defined(NDEBUG)
# pragma optimize("", off)
# pragma optimize("ts", on)
#endif