File tree Expand file tree Collapse file tree 3 files changed +10
-7
lines changed
Expand file tree Collapse file tree 3 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -137,8 +137,8 @@ if(CMAKE_COMPILER_IS_GNU)
137137 set (CMAKE_C_FLAGS_RELEASE "-O2" )
138138 set (CMAKE_C_FLAGS_DEBUG "-O0 -g3" )
139139 set (CMAKE_C_FLAGS_COVERAGE "-O0 -g3 --coverage" )
140- set (CMAKE_C_FLAGS_ASAN "-Werror -fsanitize=address -fno-common -O3" )
141- set (CMAKE_C_FLAGS_ASANDBG "-Werror -fsanitize=address -fno-common -O1 -g3 -fno-omit-frame-pointer -fno-optimize-sibling-calls " )
140+ set (CMAKE_C_FLAGS_ASAN "-Werror -fsanitize=address -fno-common -fsanitize=undefined -fno-sanitize-recover=all - O3" )
141+ set (CMAKE_C_FLAGS_ASANDBG "-Werror -fsanitize=address -fno-common -fsanitize=undefined -fno-sanitize-recover=all - O1 -g3 -fno-omit-frame-pointer -fno-optimize-sibling-calls" )
142142 set (CMAKE_C_FLAGS_CHECK "-Werror -Os" )
143143 set (CMAKE_C_FLAGS_CHECKFULL "${CMAKE_C_FLAGS_CHECK} -Wcast-qual" )
144144endif (CMAKE_COMPILER_IS_GNU)
@@ -149,7 +149,7 @@ if(CMAKE_COMPILER_IS_CLANG)
149149 set (CMAKE_C_FLAGS_DEBUG "-O0 -g3" )
150150 set (CMAKE_C_FLAGS_COVERAGE "-O0 -g3 --coverage" )
151151 set (CMAKE_C_FLAGS_ASAN "-Werror -fsanitize=address -fno-common -fsanitize=undefined -fno-sanitize-recover=all -O3" )
152- set (CMAKE_C_FLAGS_ASANDBG "-Werror -fsanitize=address -fno-common -fsanitize=undefined -fno-sanitize-recover=all -O1 -g3 -fno-omit-frame-pointer -fno-optimize-sibling-calls " )
152+ set (CMAKE_C_FLAGS_ASANDBG "-Werror -fsanitize=address -fno-common -fsanitize=undefined -fno-sanitize-recover=all -O1 -g3 -fno-omit-frame-pointer -fno-optimize-sibling-calls" )
153153 set (CMAKE_C_FLAGS_MEMSAN "-Werror -fsanitize=memory -O3" )
154154 set (CMAKE_C_FLAGS_MEMSANDBG "-Werror -fsanitize=memory -O1 -g3 -fno-omit-frame-pointer -fno-optimize-sibling-calls -fsanitize-memory-track-origins=2" )
155155 set (CMAKE_C_FLAGS_CHECK "-Werror -Os" )
Original file line number Diff line number Diff line change @@ -214,9 +214,12 @@ psa_status_t psa_its_set( psa_storage_uid_t uid,
214214 n = fwrite ( & header , 1 , sizeof ( header ), stream );
215215 if ( n != sizeof ( header ) )
216216 goto exit ;
217- n = fwrite ( p_data , 1 , data_length , stream );
218- if ( n != data_length )
219- goto exit ;
217+ if ( data_length != 0 )
218+ {
219+ n = fwrite ( p_data , 1 , data_length , stream );
220+ if ( n != data_length )
221+ goto exit ;
222+ }
220223 status = PSA_SUCCESS ;
221224
222225exit :
Original file line number Diff line number Diff line change @@ -701,7 +701,7 @@ component_test_no_use_psa_crypto_full_cmake_asan() {
701701 # full minus MBEDTLS_USE_PSA_CRYPTO: run the same set of tests as basic-build-test.sh
702702 msg " build: cmake, full config + MBEDTLS_USE_PSA_CRYPTO, ASan"
703703 scripts/config.pl full
704- scripts/config.pl unset MBEDTLS_MEMORY_BACKTRACE # too slow for tests
704+ scripts/config.pl unset MBEDTLS_MEMORY_BUFFER_ALLOC_C
705705 scripts/config.pl set MBEDTLS_ECP_RESTARTABLE # not using PSA, so enable restartable ECC
706706 scripts/config.pl set MBEDTLS_PSA_CRYPTO_C
707707 scripts/config.pl unset MBEDTLS_USE_PSA_CRYPTO
You can’t perform that action at this time.
0 commit comments