Running `make test` with Clang sanitizers results in some issues with
unaligned pointers surrounding a use of buffers cast to a unsigned
int*. The sanitizers used were `-fsanitize=undefined
-fsanitize=address`.
I believe the issues flagged below are undefined behavior.
<---snip--->
../util/shlib_wrap.sh ./rsa_test
PKCS #1 v1.5 encryption/decryption ok
../md32_common.h:399:2: runtime error: store to misaligned address
0x606000007c55 for type 'unsigned int', which requires 4 byte
alignment
0x606000007c55: note: pointer points here
be be be be be be be be be be be be be be be be be be be be be be
be be be be be be be be be be
^
../md32_common.h:399:2: runtime error: store to misaligned address
0x606000007c59 for type 'unsigned int', which requires 4 byte
alignment
0x606000007c59: note: pointer points here
da 39 a3 ee be be be be be be be be be be be be be be be be be be
be be be be be be be be be be
^
../md32_common.h:399:2: runtime error: store to misaligned address
0x606000007c5d for type 'unsigned int', which requires 4 byte
alignment
0x606000007c5d: note: pointer points here
5e 6b 4b 0d be be be be be be be be be be be be be be be be be be
be be be be be be be be be be
^
../md32_common.h:399:2: runtime error: store to misaligned address
0x606000007c61 for type 'unsigned int', which requires 4 byte
alignment
0x606000007c61: note: pointer points here
32 55 bf ef be be be be be be be be be be be be be be be be be be
be be be be be be be be be be
^
../md32_common.h:399:2: runtime error: store to misaligned address
0x606000007c65 for type 'unsigned int', which requires 4 byte
alignment
0x606000007c65: note: pointer points here
95 60 18 90 be be be be be be be be be be be be be be be be be be
be be be be be be be be be 00
^
OAEP encryption/decryption ok
<---snip--->
*****
$ /usr/local/bin/clang -v
clang version 3.3 (tags/RELEASE_33/final)
Target: x86_64-apple-darwin12.5.0
Thread model: posix
$ apps/openssl version -a
WARNING: can't open config file: /usr/local/ssl/openssl.cnf
OpenSSL 1.1.0-dev xx XXX xxxx
built on: Wed Jul 2 20:05:35 EDT 2014
platform: darwin64-x86_64-cc
options: bn(64,64) rc4(16x,int) des(idx,cisc,16,int) idea(int) blowfish(idx)
compiler: /usr/local/bin/clang -DOPENSSL_THREADS -D_REENTRANT
-DDSO_DLFCN -DHAVE_DLFCN_H -Wa,--noexecstack -arch x86_64 -O3
-DL_ENDIAN -Wall -fsanitize=undefined -fsanitize=address
-DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5
-DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM
-DAES_ASM -DVPAES_ASM -DBSAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM
OPENSSLDIR: "/usr/local/ssl"
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List [email protected]
Automated List Manager [email protected]