mirror of
https://github.com/cuberite/polarssl.git
synced 2025-09-07 14:15:58 -04:00
Remove _Thread_local variable for 2.28
We do not intend to support multithreaded testing in 2.28, so introducing a C11 feature here is an unnecessary burden. Signed-off-by: David Horstmann <david.horstmann@arm.com>
This commit is contained in:
parent
e7bfbc27bf
commit
7dfb6121fc
@ -21,12 +21,9 @@
|
||||
* memory as poisoned, which can be used to enforce some memory access
|
||||
* policies.
|
||||
*
|
||||
* Support for the C11 thread_local keyword is also required.
|
||||
*
|
||||
* Currently, only Asan (Address Sanitizer) is supported.
|
||||
*/
|
||||
#if defined(MBEDTLS_TEST_HAVE_ASAN) && \
|
||||
(__STDC_VERSION__ >= 201112L)
|
||||
#if defined(MBEDTLS_TEST_HAVE_ASAN)
|
||||
# define MBEDTLS_TEST_MEMORY_CAN_POISON
|
||||
#endif
|
||||
|
||||
@ -64,11 +61,11 @@
|
||||
|
||||
#if defined(MBEDTLS_TEST_MEMORY_CAN_POISON)
|
||||
|
||||
/** Thread-local variable used to enable memory poisoning. This is set and
|
||||
* unset in the test wrappers so that calls to PSA functions from the library
|
||||
* do not poison memory.
|
||||
/** Variable used to enable memory poisoning. This is set and unset in the
|
||||
* test wrappers so that calls to PSA functions from the library do not
|
||||
* poison memory.
|
||||
*/
|
||||
extern _Thread_local unsigned int mbedtls_test_memory_poisoning_count;
|
||||
extern unsigned int mbedtls_test_memory_poisoning_count;
|
||||
|
||||
/** Poison a memory area so that any attempt to read or write from it will
|
||||
* cause a runtime failure.
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
#if defined(MBEDTLS_TEST_MEMORY_CAN_POISON)
|
||||
|
||||
_Thread_local unsigned int mbedtls_test_memory_poisoning_count = 0;
|
||||
unsigned int mbedtls_test_memory_poisoning_count = 0;
|
||||
|
||||
static void align_for_asan(const unsigned char **p_ptr, size_t *p_size)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user