From 33dc5d611f578ace9833a80dc006a34b09da18af Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Fri, 25 May 2018 19:35:52 -0700 Subject: fixes #484 crashes in websocket transport fixes #490 posix_epdesc use-after-free bug fixes #489 Sanitizer based testing would help fixes #492 Numerous memory leaks found with sanitizer This introduces support for compiler-based sanitizers when using clang or gcc (and not on Windows). See NNG_SANITIZER for possible settings such as "thread" or "address". Furthermore, we have fixed the issues we found with both the thread and address sanitizers. We believe that the thread issues pointed to a low frequency use-after-free responsible for rare crashes in some of the tests. The tests generally have their timeouts doubled when running under a sanitizer, to account for the extra long times that the sanitizer can cause these to take. While here, we also changed the compat_ws test to avoid a particularly painful and time consuming DNS lookup, and we made the nngcat_unlimited test a bit more robust by waiting before sending traffic. --- tools/nngcat/nngcat_unlimited_test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/nngcat/nngcat_unlimited_test.sh b/tools/nngcat/nngcat_unlimited_test.sh index 7b5b4f2c..5cc46f08 100644 --- a/tools/nngcat/nngcat_unlimited_test.sh +++ b/tools/nngcat/nngcat_unlimited_test.sh @@ -26,7 +26,7 @@ goodsum=${goodsum%% *} ${NNGCAT} --listen ${ADDR} --count=1 --recv-maxsz=0 --pull0 --raw > $OUTPUT 2>/dev/null & sleep 1 # for speed of execution, run these in the background, they should be ignored -${NNGCAT} --connect ${ADDR} --push0 --file ${INPUT} +${NNGCAT} --connect ${ADDR} --delay=1 --push0 --file ${INPUT} wait $bgid 2>/dev/null sum=$(cksum ${OUTPUT}) -- cgit v1.2.3-70-g09d2