The calls to pthread_mutex_{lock,unlock,destroy} in "virthread.c"
ignore the return value of these functions.
This series fixes all "double unlock mutex" and "destroy locked
mutex"
issues I came across and adds checks to the calls to pthread_mutex_*,
so no new issues of this type are introduced.
Patches 1, 2, 3, and 4 fix the issues, patches 5, 6, and 7 add the
checks.
See
https://gitlab.com/twiederh/libvirt/-/pipelines/348505233 and
https://gitlab.com/twiederh/libvirt/-/pipelines/348505233 (only
patches 5, 6, and 7).
Regards,
Tim
Tim Wiederhake (7):
tests: qemuMonitorTestFree: Unlock virDomainObj before freeing
qemusecuritytest: Unlock virDomainObj before disposal
qemuxml2argvtest: Unlock virDomainObj before disposal
qemuhotplugtest: Lock reused virDomainObj
Meson: Define "DYNAMIC_ANALYSIS" if built with sanitizers enabled
virMutex*: Warn on error
virMutex*: Fail loudly
meson.build | 4 ++++
src/util/virthread.c | 24 +++++++++++++++++++++---
tests/qemuhotplugtest.c | 1 +
tests/qemumonitortestutils.c | 2 +-
tests/qemusecuritytest.c | 3 ++-
tests/qemuxml2argvtest.c | 12 +++++++-----
6 files changed, 36 insertions(+), 10 deletions(-)
--
2.31.1