llvm-project/clang/unittests/DirectoryWatcher
Ben Langmuir 2ac0c4b46e [DirectoryWatcher] Fix misuse of FSEvents API and data race
I observed two bugs in the DirectoryWatcher on macOS

1. We were calling FSEventStreamStop and FSEventStreamInvalidate before
we called FSEventStreamStart and FSEventStreamSetDispatchQueue, if the
DirectoryWatcher was destroyed before the initial async work was done.
This violates the requirements of the FSEvents API.

2. Calls to Receiver could race between the initial work and the
invalidation during destruction.

The second issue is easier to see when using TSan.

Differential Revision: https://reviews.llvm.org/D74371

rdar://59215667
2020-02-11 09:25:38 -08:00
..
CMakeLists.txt Use ASSERT_THAT_ERROR instead of logAllUnhandledErrors/exit 2019-08-09 06:14:54 +00:00
DirectoryWatcherTest.cpp [DirectoryWatcher] Fix misuse of FSEvents API and data race 2020-02-11 09:25:38 -08:00