Warn if using a memory sanitizer on AESNI
Clang-Msan is known to report spurious errors when MBEDTLS_AESNI_C is enabled, due to the use of assembly code. The error reports don't mention AES, so they can be difficult to trace back to the use of AES-NI. Warn about this potential problem at compile time.
This commit is contained in:
parent
32605dc830
commit
5053efde33
1 changed files with 6 additions and 0 deletions
|
@ -32,6 +32,12 @@
|
||||||
|
|
||||||
#if defined(MBEDTLS_AESNI_C)
|
#if defined(MBEDTLS_AESNI_C)
|
||||||
|
|
||||||
|
#if defined(__has_feature)
|
||||||
|
#if __has_feature(memory_sanitizer)
|
||||||
|
#warning "MBEDTLS_AESNI_C is known to cause spurious error reports with some memory sanitizers as they do not understand the assembly code."
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "mbedtls/aesni.h"
|
#include "mbedtls/aesni.h"
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue