From 4b317616ebd03818747d768f27a7d8507b5de1b1 Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Mon, 8 Apr 2019 16:58:02 +0200 Subject: [PATCH 1/3] Run ssl-opt.sh on 32-bit runtime Run ssl-opt.sh on x86_32 with ASan. This may detect bugs that only show up on 32-bit platforms, for example due to size_t overflow. For this component, turn off some memory management features that are not useful, potentially slow, and may reduce ASan's effectiveness at catching buffer overflows. --- tests/scripts/all.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/scripts/all.sh b/tests/scripts/all.sh index d8374ccc1..ebd39f086 100755 --- a/tests/scripts/all.sh +++ b/tests/scripts/all.sh @@ -1096,10 +1096,16 @@ component_test_m32_o1 () { # Build again with -O1, to compile in the i386 specific inline assembly msg "build: i386, make, gcc -O1 (ASan build)" # ~ 30s scripts/config.pl full + scripts/config.pl unset MBEDTLS_MEMORY_BACKTRACE + scripts/config.pl unset MBEDTLS_MEMORY_BUFFER_ALLOC_C + scripts/config.pl unset MBEDTLS_MEMORY_DEBUG make CC=gcc CFLAGS='-O1 -Werror -Wall -Wextra -m32 -fsanitize=address' msg "test: i386, make, gcc -O1 (ASan build)" make test + + msg "test ssl-opt.sh, i386, make, gcc-O1" + if_build_succeeded tests/ssl-opt.sh } support_test_m32_o1 () { support_test_m32_o0 "$@" From 7832c9fc3da624aa69c3d7436a154010e0c58386 Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Mon, 8 Apr 2019 17:00:15 +0200 Subject: [PATCH 2/3] Add an "out-of-box" component Just run `make` and `make test`. And `selftest` for good measure. --- tests/scripts/all.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/scripts/all.sh b/tests/scripts/all.sh index ebd39f086..c74e67a11 100755 --- a/tests/scripts/all.sh +++ b/tests/scripts/all.sh @@ -611,6 +611,17 @@ component_check_doxygen_warnings () { #### Build and test many configurations and targets ################################################################ +component_test_default_out_of_box () { + msg "build: make, default config (out-of-box)" # ~1min + make + + msg "test: main suites make, default config (out-of-box)" # ~10s + make test + + msg "selftest: make, default config (out-of-box)" # ~10s + programs/test/selftest +} + component_test_default_cmake_gcc_asan () { msg "build: cmake, gcc, ASan" # ~ 1 min 50s CC=gcc cmake -D CMAKE_BUILD_TYPE:String=Asan . From f1349e4bfef8d535588deda88c62634e31972284 Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Mon, 8 Apr 2019 17:00:56 +0200 Subject: [PATCH 3/3] Clarify comment mangled by an earlier refactoring --- tests/scripts/all.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/scripts/all.sh b/tests/scripts/all.sh index c74e67a11..6765dc1bd 100755 --- a/tests/scripts/all.sh +++ b/tests/scripts/all.sh @@ -1337,10 +1337,8 @@ component_test_valgrind () { msg "test: main suites valgrind (Release)" make memcheck - # Optional part(s) - # Currently broken, programs don't seem to receive signals - # under valgrind on OS X - + # Optional parts (slow; currently broken on OS X because programs don't + # seem to receive signals under valgrind on OS X). if [ "$MEMORY" -gt 0 ]; then msg "test: ssl-opt.sh --memcheck (Release)" if_build_succeeded tests/ssl-opt.sh --memcheck