[clang] [clang][analyzer] Move unix.BlockInCriticalSection out of alpha (PR #93815)

Balazs Benics via cfe-commits cfe-commits at lists.llvm.org
Sat Jun 1 00:44:52 PDT 2024


================
@@ -1235,6 +1235,49 @@ Check calls to various UNIX/Posix functions: ``open, pthread_once, calloc, mallo
 .. literalinclude:: checkers/unix_api_example.c
     :language: c
 
+.. _unix-BlockInCriticalSection:
+
+unix.BlockInCriticalSection (C)
+"""""""""""""""""""""""""""""""""""""
+Check for calls to blocking functions inside a critical section.
+Blocking functions detected by this checker: ``sleep, getc, fgets, read, recv``.
+Critical section handling functions modelled by this checker: ``lock, unlock, pthread_mutex_lock, pthread_mutex_trylock, pthread_mutex_unlock, mtx_lock, mtx_timedlock, mtx_trylock, mtx_unlock, lock_guard, unique_lock``.
----------------
steakhal wrote:

This line is probably already too long. Let's break it.

https://github.com/llvm/llvm-project/pull/93815


More information about the cfe-commits mailing list