summaryrefslogtreecommitdiffstats
path: root/www/analyzer
diff options
context:
space:
mode:
authorGabor Horvath <xazax.hun@gmail.com>2017-03-10 14:50:12 +0000
committerGabor Horvath <xazax.hun@gmail.com>2017-03-10 14:50:12 +0000
commit1531e0774c5897389431d26270424039a2f7a789 (patch)
tree44c48392c9d2c67b452d248649dc39ba8cc0af37 /www/analyzer
parenta99e3e65489d93c72eec1870d15e1c63219f558f (diff)
[analyzer] Extend block in critical section check with C11 and Pthread APIs.
Patch by Zoltan Daniel Torok! Differential Revision: https://reviews.llvm.org/D29567 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@297461 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'www/analyzer')
-rw-r--r--www/analyzer/alpha_checks.html24
1 files changed, 24 insertions, 0 deletions
diff --git a/www/analyzer/alpha_checks.html b/www/analyzer/alpha_checks.html
index 0312d16ace..ce9392b996 100644
--- a/www/analyzer/alpha_checks.html
+++ b/www/analyzer/alpha_checks.html
@@ -910,6 +910,30 @@ void test(char *y) {
}
</pre></div></div></td></tr>
+
+<tr><td><div class="namedescr expandable"><span class="name">
+alpha.unix.cstring.BlockInCriticalSection</span><span class="lang">
+(C)</span><div class="descr">
+Check for calls to blocking functions inside a critical section; applies
+to:<div class=functions>
+lock, unlock<br>
+sleep<br>
+getc<br>
+fgets<br>
+read<br>
+recv<br>
+pthread_mutex_lock, pthread_mutex_trylock, pthread_mutex_unlock<br>
+mtx_lock, mtx_timedlock, mtx_trylock, mtx_unlock<br>
+</div></div></div></td>
+<td><div class="exampleContainer expandable">
+<div class="example"><pre>
+void testBlockInCriticalSection() {
+ std::mutex m;
+ m.lock();
+ sleep(3); // warn
+ m.unlock();
+}
+</pre></div></div></td></tr>
</tbody></table>
</div> <!-- page -->