From: Paul F. <pa...@so...> - 2025-04-18 18:38:52
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=d497c30fc6398a4b3aee92231749ac4072c7de3b commit d497c30fc6398a4b3aee92231749ac4072c7de3b Author: Paul Floyd <pj...@wa...> Date: Fri Apr 18 20:37:12 2025 +0200 Doc: add description of cond signal without mutex lock. Diff: --- helgrind/docs/hg-manual.xml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/helgrind/docs/hg-manual.xml b/helgrind/docs/hg-manual.xml index 6ec8caa3f4..398fd73a70 100644 --- a/helgrind/docs/hg-manual.xml +++ b/helgrind/docs/hg-manual.xml @@ -141,6 +141,15 @@ are:</para> <para>Checks pertaining to the validity of mutexes are generally also performed for reader-writer locks.</para> +<para>Signalling or broadcasting a condition variable when the +associated mutex is unlocked is not strictly an error. The resulting +thread scheduling may be unpredictable if the mutex is not held. +The option <computeroutput>--check-cond-signal-mutex=yes|no</computeroutput> +turns on checking for this situation. This kind of error is +categorised as 'dubious'. The check is not turned on by default +because some standard C and C++ libraries use condition +signals/broadcasts with the associated mutex unlocked.</para> + <para>Various kinds of this-can't-possibly-happen events are also reported. These usually indicate bugs in the system threading library.</para> |