From baf165ffd0cb68020fdce57c894c48e715ad6ef5 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Mon, 14 Sep 2020 11:02:33 +1000 Subject: [PATCH 1/2] clear pointer before subtracting reference --- lib/ns/tests/nstest.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/ns/tests/nstest.c b/lib/ns/tests/nstest.c index bc421272aa..769bac28fb 100644 --- a/lib/ns/tests/nstest.c +++ b/lib/ns/tests/nstest.c @@ -107,6 +107,8 @@ __wrap_isc_nmhandle_detach(isc_nmhandle_t **handlep) { ns_client_t *client = (ns_client_t *)handle; int i; + *handlep = NULL; + for (i = 0; i < 32; i++) { if (atomic_load(&client_addrs[i]) == (uintptr_t)client) { break; @@ -122,7 +124,6 @@ __wrap_isc_nmhandle_detach(isc_nmhandle_t **handlep) { isc_mem_put(mctx, client, sizeof(ns_client_t)); } - *handlep = NULL; return; } From 1418f7e186d15e5d0ac8ede0976e35e9392ff884 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Mon, 14 Sep 2020 12:03:45 +1000 Subject: [PATCH 2/2] TSAN errors on unit tests should now be fatal --- .gitlab-ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 34a09d0fe5..518c48fd2c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -341,7 +341,6 @@ stages: .unit_test_tsan: &unit_test_tsan_job <<: *unit_test_common - allow_failure: true after_script: - find lib -name 'tsan.*' -exec python3 util/parse_tsan.py {} \; artifacts: