Bug 410753 - [check proposal] not holding mutex locks when emitting signals
Summary: [check proposal] not holding mutex locks when emitting signals
Status: REPORTED
Alias: None
Product: clazy
Classification: Developer tools
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: Unassigned bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-08-09 08:41 UTC by Jean-Michaël Celerier
Modified: 2019-09-01 13:32 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jean-Michaël Celerier 2019-08-09 08:41:10 UTC
It is a fast-track to recursive locks and deadlocks.

Like https://bugs.kde.org/show_bug.cgi?id=410751, it should not try to be recursive and could in the first time be using simple heuristics, such as : 
- is there a std::lock_guard object in the scope where the signal is emitted or a parent one
- in a second time, try to handle more complicated cases such as explicit mutex.lock(), std::unique_lock or QMutexLocker.

This likely needs a proper control flow graph analysis to be correct, does clang has something for that ?