mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2026-05-09 03:04:24 +02:00
Fix memory poisoning with Asan on arbitrary byte boundaries
Asan poisons memory with an 8-byte granularity. We want to make sure that the whole specified region is poisoned (our typical use case is a heap-allocated object, and we want to poison the whole object, and we don't care about the bytes after the end of the object and up to the beginning of the next object). So align the start and end of the region to (un)poison to an 8-byte boundary. Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
@@ -332,6 +332,13 @@ metatest_t metatests[] = {
|
||||
{ "read_uninitialized_stack", "msan", read_uninitialized_stack },
|
||||
{ "memory_leak", "asan", memory_leak },
|
||||
{ "test_memory_poison_0_0_8", "asan", test_memory_poison },
|
||||
{ "test_memory_poison_0_7_8", "asan", test_memory_poison },
|
||||
{ "test_memory_poison_0_0_1", "asan", test_memory_poison },
|
||||
{ "test_memory_poison_0_1_2", "asan", test_memory_poison },
|
||||
{ "test_memory_poison_7_0_8", "asan", test_memory_poison },
|
||||
{ "test_memory_poison_7_7_8", "asan", test_memory_poison },
|
||||
{ "test_memory_poison_7_0_1", "asan", test_memory_poison },
|
||||
{ "test_memory_poison_7_1_2", "asan", test_memory_poison },
|
||||
{ "mutex_lock_not_initialized", "pthread", mutex_lock_not_initialized },
|
||||
{ "mutex_unlock_not_initialized", "pthread", mutex_unlock_not_initialized },
|
||||
{ "mutex_free_not_initialized", "pthread", mutex_free_not_initialized },
|
||||
|
||||
Reference in New Issue
Block a user