aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/native/fsevents.cc
Commit message (Collapse)AuthorAge
* Initialize the mutex in JNIEventsDiffAwareness Gravatar Julio Merino2017-03-07
| | | | | | | | | | | | | | | | | | | | | | | | pthread mutexes must be initialized with pthread_mutex_init and cleaned up with pthread_mutex_destroy. This seems to fix a race where poll() would access invalid array indexes on an array constructed based on the size of a shared list protected by the mutex. This is understandable because the mutex may not have been doing anything due to the lack of its proper initialization -- and, if so, I'm surprised the consequences were not more catastrophic. As with any race condition, it is hard to confirm that this fixes the observed problem, but I could trivially reproduce this issue earlier and now I cannot with this fix after tens of runs. See reproduction code in the referenced bug for details on how to expose the issue. Fixes #1676. -- Change-Id: Ia5a4a8f12da7c3780f33266b9922eeba7645b3a4 Reviewed-on: https://cr.bazel.build/9230 PiperOrigin-RevId: 149414125 MOS_MIGRATED_REVID=149414125
* --watchfs for OSX: use kFSEventStreamCreateFlagNoDefer to receive event as ↵Gravatar Damien Martin-Guillerez2016-10-14
| | | | | | | | | | | | | | | | soon as they arrives See https://developer.apple.com/reference/coreservices/1455376-fseventstreamcreateflags/kfseventstreamcreateflagnodefer?language=objc Also added the integration test now it is no more flaky. Tested with `bazel test src/test/java/com/google/devtools/build/lib/skyframe:SkyframeTests --runs_per_test 10 --test_filter=com.google.devtools.build.lib.skyframe.MacOSXFsEventsDiffAwarenessTest --nocache_test_results` Fixes #1362. -- Change-Id: I42ceebd8c5a2e0156653b140ca049af45d2e1e80 Reviewed-on: https://bazel-review.googlesource.com/6613 MOS_MIGRATED_REVID=136078777
* Fix delete[] warning on fsevents.ccGravatar Damien Martin-Guillerez2016-06-08
| | | | | | | Fixes #1347. -- MOS_MIGRATED_REVID=124330246
* Introduce FsEventsDiffAwareness for OS X.Gravatar Damien Martin-Guillerez2016-06-02
Use FsEvents API (https://developer.apple.com/library/mac/documentation/Darwin/Reference/FSEvents_Ref) to watch the file system. This change also refactor the LocalDiffAwareness to extract the WatchService specific part. It now select the FsEventsDiffAwareness on OSX and the WatchServiceDiffAwareness on Linux. RELNOTES[NEW]: On OSX, --watchfs now uses FsEvents to be notified of changes from the filesystem (previously, this flag had no effect on OS X). Fixes #1074. -- Change-Id: I927951468e4543a399e0e0ad0f1dd23d38ce15a0 Reviewed-on: https://bazel-review.googlesource.com/3420 MOS_MIGRATED_REVID=123854017