Don't use the uint128_t P-256 code under MSAN.

MSAN appears to have a bug that causes this code to be miscompiled when
compiled with optimisations. In order to prevent that bug from holding
everything up, this change disables that code when MEMORY_SANITIZER is
defined. The generic elliptic-curve code can pick up the slack in that
case.

Change-Id: I7ce26969b3ee0bc0b0496506f06a8cf9b2523cfa
This commit is contained in:
Adam Langley 2015-08-20 15:15:30 -07:00
parent 4838d8aa90
commit 28bc6eba28

View File

@ -222,7 +222,11 @@ const struct built_in_curve OPENSSL_built_in_curves[] = {
{NID_secp224r1, &P224, 0},
{
NID_X9_62_prime256v1, &P256,
#if defined(OPENSSL_64_BIT) && !defined(OPENSSL_WINDOWS)
/* MSAN appears to have a bug that causes this P-256 code to be miscompiled
* in opt mode. While that is being looked at, don't run the uint128_t
* P-256 code under MSAN for now. */
#if defined(OPENSSL_64_BIT) && !defined(OPENSSL_WINDOWS) && \
!defined(MEMORY_SANITIZER)
EC_GFp_nistp256_method,
#else
0,