Commit d1e4e4d4 authored by Andrii Grynenko's avatar Andrii Grynenko Committed by Facebook GitHub Bot

Fix stack use after return in Observer.ObservableLockInversion

Reviewed By: praihan

Differential Revision: D32297368

fbshipit-source-id: a58c7805d396cc30c0d82a49d5998e2f9d8a799a
parent e5276d4b
...@@ -951,7 +951,7 @@ TEST(Observer, ObservableLockInversion) { ...@@ -951,7 +951,7 @@ TEST(Observer, ObservableLockInversion) {
while (true) { while (true) {
std::lock_guard<std::mutex> lg(lockingObservableLock); std::lock_guard<std::mutex> lg(lockingObservableLock);
if (**makeObserver([&] { return **observer; }) == kNumIters) { if (**makeObserver([o = observer] { return **o; }) == kNumIters) {
break; break;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment