mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-01-28 18:32:56 +00:00
Don't inline mbedtls_mpi_safe_cond_assign on MSVC/ARM64 to avoid a compiler bug.
Signed-off-by: Tautvydas Žilys <tautvydas.zilys@gmail.com>
This commit is contained in:
parent
f51b79c297
commit
60165d7708
@ -533,6 +533,13 @@ cleanup:
|
|||||||
* about whether the assignment was made or not.
|
* about whether the assignment was made or not.
|
||||||
* (Leaking information about the respective sizes of X and Y is ok however.)
|
* (Leaking information about the respective sizes of X and Y is ok however.)
|
||||||
*/
|
*/
|
||||||
|
#if defined(_MSC_VER) && defined(_M_ARM64)
|
||||||
|
/*
|
||||||
|
* MSVC miscompiles this function if it's inlined. See:
|
||||||
|
* https://developercommunity.visualstudio.com/t/c-compiler-miscompiles-part-of-mbedtls-library-on/1646989
|
||||||
|
*/
|
||||||
|
__declspec(noinline)
|
||||||
|
#endif
|
||||||
int mbedtls_mpi_safe_cond_assign( mbedtls_mpi *X,
|
int mbedtls_mpi_safe_cond_assign( mbedtls_mpi *X,
|
||||||
const mbedtls_mpi *Y,
|
const mbedtls_mpi *Y,
|
||||||
unsigned char assign )
|
unsigned char assign )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user