summaryrefslogtreecommitdiffstats
path: root/crypto/cast
diff options
context:
space:
mode:
authorEmilia Kasper <emilia@openssl.org>2016-04-08 18:55:28 +0200
committerEmilia Kasper <emilia@openssl.org>2016-04-10 01:50:45 +0200
commitcdbf577973a76a0627debb5105f46d6f4509c39e (patch)
tree6364727252f4076a71e3bd3111ca4c4ad3edceec /crypto/cast
parent50eadf2a242468a9552fc770cb7e5ebfd89c6bb1 (diff)
Disable some sanitizer checks without PEDANTIC
Code without PEDANTIC has intentional "undefined" behaviour. To get best coverage for both PEDANTIC and non-PEDANTIC codepaths, run the sanitizer builds in two different configurations: 1) Without PEDANTIC but with alignment checks disabled. 2) With PEDANTIC. To not overload Travis too much, run one build with clang and the other with gcc (chosen at random). Also remove a micro-optimization in CAST code to be able to -fsanitize=shift. Whether shift sanitization is meaningful for crypto or an obstacle is debatable but since this appears to be the only offender, we might as well keep the check for now. Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'crypto/cast')
-rw-r--r--crypto/cast/cast_lcl.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/crypto/cast/cast_lcl.h b/crypto/cast/cast_lcl.h
index 10a1de3d73..4a3c603507 100644
--- a/crypto/cast/cast_lcl.h
+++ b/crypto/cast/cast_lcl.h
@@ -151,10 +151,8 @@
#if defined(OPENSSL_SYS_WIN32) && defined(_MSC_VER)
# define ROTL(a,n) (_lrotl(a,n))
-#elif defined(PEDANTIC)
-# define ROTL(a,n) ((((a)<<(n))&0xffffffffL)|((a)>>((32-(n))&31)))
#else
-# define ROTL(a,n) ((((a)<<(n))&0xffffffffL)|((a)>>(32-(n))))
+# define ROTL(a,n) ((((a)<<(n))&0xffffffffL)|((a)>>((32-(n))&31)))
#endif
#define C_M 0x3fc