mirror of
https://github.com/yuzu-mirror/mbedtls.git
synced 2026-04-04 22:19:05 +00:00
code style
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
This commit is contained in:
parent
2d28c46055
commit
2b174abd86
1 changed files with 5 additions and 2 deletions
|
|
@ -76,8 +76,11 @@
|
|||
#define TEST_CF_PUBLIC __msan_unpoison
|
||||
// void __msan_unpoison(const volatile void *a, size_t size);
|
||||
|
||||
#define TEST_CF_SAVE_SECRET(_x) int _test_cf_is_public_ ## _x = __msan_test_shadow(&(_x), sizeof(_x)) == -1; TEST_CF_PUBLIC(&(_x), sizeof(_x));
|
||||
#define TEST_CF_RESTORE_SECRET(_x) do { if (!_test_cf_is_public_ ## _x) TEST_CF_SECRET(&(_x), sizeof(_x)); } while(0)
|
||||
#define TEST_CF_SAVE_SECRET(_x) \
|
||||
int _test_cf_is_public_ ## _x = __msan_test_shadow(&(_x), sizeof(_x)) == -1; \
|
||||
TEST_CF_PUBLIC(&(_x), sizeof(_x));
|
||||
#define TEST_CF_RESTORE_SECRET(_x) \
|
||||
if (!_test_cf_is_public_ ## _x) TEST_CF_SECRET(&(_x), sizeof(_x));
|
||||
|
||||
#elif defined(MBEDTLS_TEST_CONSTANT_FLOW_VALGRIND)
|
||||
#include <valgrind/memcheck.h>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue