Prevent unaligned access under ASan builds
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
This commit is contained in:
parent
15531bc6d2
commit
1bab27f983
1 changed files with 3 additions and 2 deletions
|
@ -73,11 +73,12 @@ extern void (*mbedtls_test_hook_test_fail)( const char * test, int line, const c
|
|||
*
|
||||
* This list is incomplete.
|
||||
*/
|
||||
#if defined(__i386__) || defined(__amd64__) || defined( __x86_64__) \
|
||||
#if (defined(__i386__) || defined(__amd64__) || defined( __x86_64__) \
|
||||
|| defined(__ARM_FEATURE_UNALIGNED) \
|
||||
|| defined(__aarch64__) \
|
||||
|| defined(__ARM_ARCH_8__) || defined(__ARM_ARCH_8A__) || defined(__ARM_ARCH_8M__) \
|
||||
|| defined(__ARM_ARCH_7A__)
|
||||
|| defined(__ARM_ARCH_7A__)) \
|
||||
&& (!(defined(__has_feature) && __has_feature(undefined_behavior_sanitizer)))
|
||||
#define MBEDTLS_ALLOW_UNALIGNED_ACCESS
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in a new issue