Commit b52a3b3
committed
Mutex::unlock - decrement _count inside lock
`Mutex::unlock` was decrementing the `_count` member after releasing
the mutex, which meant it was unprotected, exposing a race that
could corrupt the count.
This could lead to an assert in `ConditionVariable::wait`, which
checks that the mutex count is one.1 parent b53dc66 commit b52a3b3
1 file changed
+5
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
126 | 131 | | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | 132 | | |
131 | 133 | | |
132 | 134 | | |
| |||
0 commit comments