Opened 4 years ago
Closed 4 years ago
#16459 closed bug (invalid)
HaikuDepot; Possible Double-Lock Issue
Reported by: | apl-haiku | Owned by: | apl-haiku |
---|---|---|---|
Priority: | normal | Milestone: | Unscheduled |
Component: | Applications/HaikuDepot | Version: | R1/Development |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Description
(c.f. Jerome from clang static analysis)
https://github.com/haiku/haiku/blob/master/src/apps/haikudepot/server/ProcessCoordinatorFactory.cpp#L106 acquires a lock which is already held by https://github.com/haiku/haiku/blob/master/src/apps/haikudepot/server/ProcessCoordinatorFactory.cpp#L61
C++ objects/haiku/x86_64/release/apps/haikudepot/ProcessCoordinatorFactory.o ../src/apps/haikudepot/server/ProcessCoordinatorFactory.cpp:106:24: warning: acquiring mutex 'model->Lock()' that is already held [-Wthread-safety-analysis]
AutoLocker<BLocker> locker(model->Lock());
../src/apps/haikudepot/server/ProcessCoordinatorFactory.cpp:61:12: note: mutex acquired here
BAutolock locker(model->Lock());
It might though be a false-positive.
Change History (2)
comment:1 by , 4 years ago
comment:2 by , 4 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
BLocker is a recursive lock, so this is a non-issue.