[master] f183416 Flexelint (neuter thread/lock diags centrally)

Poul-Henning Kamp phk at FreeBSD.org
Wed Apr 26 15:21:05 CEST 2017


commit f183416a4f9f9b4a6e94353afb4dd81bca58a3af
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Wed Apr 26 13:20:16 2017 +0000

    Flexelint (neuter thread/lock diags centrally)

diff --git a/bin/varnishd/flint.lnt b/bin/varnishd/flint.lnt
index 5432486..e6eac30 100644
--- a/bin/varnishd/flint.lnt
+++ b/bin/varnishd/flint.lnt
@@ -55,10 +55,6 @@
 //-sem (pthread_mutex_lock, thread_lock)
 -sem (pthread_mutex_trylock, thread_lock)
 -sem (VBE_DropRefLocked, thread_unlock)
--e454	// mutex not released (...ReleaseLocked)
--e457	// unprotected access
-
--esym(458, params)	// unlocked access
 
 -emacro(835, HCB_BIT_NODE)	// Info 835: A zero has been given as left argument to operator '<<'
 -emacro(835, VBC_STATE_AVAIL)	// Info 835: A zero has been given as left argument to operator '<<'
@@ -80,8 +76,6 @@
 -efile(451, "symbol_kind.h")	// No include guard
 -efile(451, "config.h")	// No include guard
 //////////////
-// -e458			// unprotected access
-// -e456			// merged locking paths
 -sem(vca_thread_acct, thread_mono)
 -sem(vca_epoll_thread, thread_mono)
 -sem(vca_kqueue_thread, thread_mono)
@@ -90,8 +84,6 @@
 -sem(exp_timer, thread_mono)
 -sem(wrk_herdtimer_thread, thread_mono)
 -sem(wrk_herder_thread, thread_mono)
--esym(458, heritage)
--esym(458, name_key)
 
 //////////////
 // 436 = Apparent preprocessor directive in invocation of macro '___'
@@ -113,8 +105,6 @@
 
 -sem(vdi_dns_cache_list_add, custodial(3))
 
--e455	// thread lock
--e458	// unprotected read
 -e717	// do ... while(1) ...
 -e850	// for loop index variable '___' whose type category is '___'
 	// is modified in body of the for loop that began at '___'
diff --git a/bin/varnishlog/flint.lnt b/bin/varnishlog/flint.lnt
index 5600f42..518e640 100644
--- a/bin/varnishlog/flint.lnt
+++ b/bin/varnishlog/flint.lnt
@@ -5,10 +5,6 @@
 
 -efile(451, "varnishlog_options.h")
 
--e457 // unprotected write access
--e459 // unprotected access
--e458 // unprotected access
-
 -e732   // Loss of sign (arg. no. 2) (int to unsigned
 -e737	// [45]  Loss of sign in promotion from int to unsigned
 -e713	// Loss of precision (assignment) (unsigned long long to long long)
diff --git a/bin/varnishstat/flint.lnt b/bin/varnishstat/flint.lnt
index 45b5b0e..c3971af 100644
--- a/bin/varnishstat/flint.lnt
+++ b/bin/varnishstat/flint.lnt
@@ -10,10 +10,6 @@
 
 -e763	// Redundant declaration for symbol '...' previously declared
 
--e457 // unprotected write access
--e459 // unprotected access
--e458 // unprotected access
-
 -e732   // Loss of sign (arg. no. 2) (int to unsigned
 -e737	// [45]  Loss of sign in promotion from int to unsigned
 -e713	// Loss of precision (assignment) (unsigned long long to long long)
diff --git a/bin/varnishtest/flint.lnt b/bin/varnishtest/flint.lnt
index 786b758..e3da9d5 100644
--- a/bin/varnishtest/flint.lnt
+++ b/bin/varnishtest/flint.lnt
@@ -21,9 +21,6 @@
 
 -e763	// Redundant declaration for symbol '...' previously declared
 
--e457 // unprotected write access
--e459 // unprotected access
--e458 // unprotected access
 //
 -e732   // Loss of sign (arg. no. 2) (int to unsigned
 -e737	// [45]  Loss of sign in promotion from int to unsigned
diff --git a/bin/varnishtop/flint.lnt b/bin/varnishtop/flint.lnt
index a91f0a3..eef5d4d 100644
--- a/bin/varnishtop/flint.lnt
+++ b/bin/varnishtop/flint.lnt
@@ -4,10 +4,6 @@
 
 -e763	// Redundant declaration for symbol '...' previously declared
 
--e457 // unprotected write access
--e459 // unprotected access
--e458 // unprotected access
-
 -e732   // Loss of sign (arg. no. 2) (int to unsigned
 -e737	// [45]  Loss of sign in promotion from int to unsigned
 -e713	// Loss of precision (assignment) (unsigned long long to long long)
diff --git a/flint.lnt b/flint.lnt
index 35d7f0e..e2c3046 100644
--- a/flint.lnt
+++ b/flint.lnt
@@ -17,6 +17,15 @@
 +libh(../../config.h)
 
 ///////////////////////////////////////////////////////////////////////
+// Thread/locking, too many false positives still
+-e454		// A thread mutex has been locked but not unlocked___
+-e455		// A thread mutex that had not been locked is being unlocked
+-e456		// Two execution paths are being combined with different mutex lock states
+-e457		// unprotected write access
+-e458		// unprotected access
+-e459		// unprotected access
+
+///////////////////////////////////////////////////////////////////////
 // General stylistic issues
 -e641		// Converting enum '...' to int
 -e716		// while(1) ...



More information about the varnish-commit mailing list