From 05ebe967bee0f90e21525235e09048916cf6f9bc Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Sun, 1 Oct 2023 21:44:31 +0200 Subject: [PATCH] Disable check_mbedtls_calloc overallocation under ASan This test case exercises an integer overflow in calloc. Under Asan, with a modern Clang, this triggers an Asan complaint. The complaint can be avoided with ASAN_OPTIONS=allocator_may_return_null=1, but this has to be set in the environment before the program starts, and could hide other errors. Signed-off-by: Gilles Peskine --- tests/suites/test_suite_platform.data | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/suites/test_suite_platform.data b/tests/suites/test_suite_platform.data index 4d5745076..397ff1b79 100644 --- a/tests/suites/test_suite_platform.data +++ b/tests/suites/test_suite_platform.data @@ -6,4 +6,10 @@ Time: get seconds time_get_seconds: Check mbedtls_calloc overallocation +# This test case exercises an integer overflow in calloc. Under Asan, with +# a modern Clang, this triggers an Asan complaint. The complaint can be +# avoided with ASAN_OPTIONS=allocator_may_return_null=1, but this has to +# be set in the environment before the program starts, and could hide +# other errors. +depends_on:!MBEDTLS_TEST_HAVE_ASAN check_mbedtls_calloc_overallocation:SIZE_MAX/2:SIZE_MAX/2