History log of /libuv/src/unix/fsevents.c (Results 1 – 25 of 47)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 6912038d 08-Mar-2024 Saúl Ibarra Corretgé

unix,fs: fix realpath calls that use the system allocator

Make sure we allocate the memory with uv__malloc so it's in turn freed
with uv__free.

Fixes: https://github.com/libuv/l

unix,fs: fix realpath calls that use the system allocator

Make sure we allocate the memory with uv__malloc so it's in turn freed
with uv__free.

Fixes: https://github.com/libuv/libuv/issues/4329

show more ...


# 1b01b786 24-May-2023 Ben Noordhuis

unix,win: replace QUEUE with struct uv__queue (#4022)

Recent versions of gcc have started emitting warnings about the liberal
type casting inside the QUEUE macros. Although the warnings

unix,win: replace QUEUE with struct uv__queue (#4022)

Recent versions of gcc have started emitting warnings about the liberal
type casting inside the QUEUE macros. Although the warnings are false
positives, let's use them as the impetus to switch to a type-safer and
arguably cleaner approach.

Fixes: https://github.com/libuv/libuv/issues/4019

show more ...


# e613fdd8 17-Feb-2023 Ben Noordhuis

macos: fix fsevents thread race conditions (#3909)

ThreadSanitizer complains about unsynchronized access to the
handle->loop->cf_state pointer.

The warning is probably benign bu

macos: fix fsevents thread race conditions (#3909)

ThreadSanitizer complains about unsynchronized access to the
handle->loop->cf_state pointer.

The warning is probably benign but the fsevents thread already knows
the pointer. It doesn't have to read it, it just needs to propagate it.

Refs: https://github.com/libuv/libuv/issues/3880

show more ...


# e9d91fcc 21-Dec-2022 Ben Noordhuis

darwin: remove unused fsevents symbol lookups (#3867)

One hasn't been in use since 2017, the other since 2013.


# 3e76e473 13-Mar-2021 Brandon Cheng

darwin: abort on pthread_attr_init fail

`pthread_attr_init` is highly unlikely to fail on macOS. Removing the
fallback behavior here to be consistent with other parts of libuv (e.g.

darwin: abort on pthread_attr_init fail

`pthread_attr_init` is highly unlikely to fail on macOS. Removing the
fallback behavior here to be consistent with other parts of libuv (e.g.
`src/unix/thread.c`), which simply call `abort()`.

PR-URL: https://github.com/libuv/libuv/pull/3132
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>

show more ...


# 608ac2e4 13-Mar-2021 Brandon Cheng

darwin: use RLIMIT_STACK for fsevents pthread

This fixes `SIGBUS` crashes on macOS 10.15 due a new change in
`FSEvents.framework` that makes it allocate a large stack array for
event

darwin: use RLIMIT_STACK for fsevents pthread

This fixes `SIGBUS` crashes on macOS 10.15 due a new change in
`FSEvents.framework` that makes it allocate a large stack array for
event paths. (See the linked nodejs/node issue for details on the
`FSEvents.framework` memory requirements change itself.)

The existing size (`4 * PTHREAD_STACK_MIN` or 32KB) causes a stack
overflow when more than ~1000 events are received at once. Setting this
to `uv__thread_stack_size()` increases it to 8192KB (by default) on
64-bit machines. This value can be configured at runtime on macOS with
`ulimit -s <size-kb>`.

The 32KB limit was originally added to reduce virtual memory
fragmentation on 32-bit systems, which is not a concern on 64-bit
systems.

Fixes: nodejs/node#37697
Refs: joyent/libuv#964
PR-URL: https://github.com/libuv/libuv/pull/3132
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>

show more ...


Revision tags: v1.41.0, v1.40.0, v1.39.0, v1.38.1, v1.38.0
# 75c8850c 28-Apr-2020 Ben Noordhuis

darwin: fix build with non-apple compilers

The header files for ApplicationServices and CoreFoundation contain
C language extensions that Apple's compiler understands but gcc does
no

darwin: fix build with non-apple compilers

The header files for ApplicationServices and CoreFoundation contain
C language extensions that Apple's compiler understands but gcc does
not, notably blocks:

https://en.wikipedia.org/wiki/Blocks_(C_language_extension)

Work around that by defining the types inline and stop including
the headers. It's inelegant but the alternatives are worse.

Fixes: https://github.com/libuv/libuv/issues/2805
PR-URL: https://github.com/libuv/libuv/pull/2811
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>

show more ...


Revision tags: v1.37.0, v1.36.0, v1.35.0, v1.34.2
# 07ddcb30 16-Jan-2020 Jameson Nash

osx,fsevent: clear pointer when deleting it [NFCI]

Set this to NULL just before disposing it to make mistakes more
painfully obvious, hopefully.

PR-URL: https://github.com/libuv

osx,fsevent: clear pointer when deleting it [NFCI]

Set this to NULL just before disposing it to make mistakes more
painfully obvious, hopefully.

PR-URL: https://github.com/libuv/libuv/pull/2626
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>

show more ...

# c8a3f5c9 13-Jan-2020 Jameson Nash

osx,fsevent: fix race during uv_loop_close

The mutex also needs to protect the access to the state->loop variable,
since that's owned by the child thread and will be destroyed as soon as

osx,fsevent: fix race during uv_loop_close

The mutex also needs to protect the access to the state->loop variable,
since that's owned by the child thread and will be destroyed as soon as
it processes our message.

Fixes: https://github.com/libuv/libuv/issues/2625
PR-URL: https://github.com/libuv/libuv/pull/2626
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>

show more ...

Revision tags: v1.34.1, v1.34.0, v1.33.1, v1.33.0, v1.32.0
# ae12376d 08-Sep-2019 Jameson Nash

fsevents: regression in watching /

This case got lost by accident in
https://github.com/libuv/libuv/pull/2082,
preventing the realpath `/` from ever matching.

Fixes: https:/

fsevents: regression in watching /

This case got lost by accident in
https://github.com/libuv/libuv/pull/2082,
preventing the realpath `/` from ever matching.

Fixes: https://github.com/nodejs/node/issues/28917
PR-URL: https://github.com/libuv/libuv/pull/2460
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <s@saghul.net>

show more ...

Revision tags: v1.31.0, v1.30.1, v1.30.0, v1.29.1, v1.29.0
# 6602fca8 03-May-2019 ken-cunningham-webuse

unix: fall back to kqueue on older macOS systems

Newer macOS systems (10.7+) use fsevents() for the fs_event backend,
but older macOS systems don't have full functionality for this in

unix: fall back to kqueue on older macOS systems

Newer macOS systems (10.7+) use fsevents() for the fs_event backend,
but older macOS systems don't have full functionality for this in
the macOS fsevents() API. Fall back to kqueue for these systems.

PR-URL: https://github.com/libuv/libuv/pull/2290
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>

show more ...

Revision tags: v1.28.0, v1.27.0, v1.26.0, v1.25.0, v1.24.1
# 2d2af382 19-Nov-2018 Jameson Nash

fsevents: really watch files with fsevents on macos 10.7+

In the original PR, the ifdef conditional was reversed,
leading to the old code-path still being used.
This also reduces som

fsevents: really watch files with fsevents on macos 10.7+

In the original PR, the ifdef conditional was reversed,
leading to the old code-path still being used.
This also reduces some of the redundancy in the conditional checks,
by factoring out the common test.
And fixes a divergence in functionality kFSEventsRenamed =>
kFSEventStreamEventFlagItemRenamed
And actually includes the part of the original PR to kqueue that enabled
watching files with fsevents!

Fixes: https://github.com/libuv/libuv/pull/387
PR-URL: https://github.com/libuv/libuv/pull/2082
Refs: https://github.com/libuv/libuv/pull/1572
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>

show more ...

Revision tags: v1.24.0, v1.23.2, v1.23.1, v1.23.0, v1.22.0
# 619937c7 28-Jun-2018 Ben Noordhuis

unix,win: merge handle flags

Some long overdue refactoring that unifies more of the UNIX and Windows
backends.

PR-URL: https://github.com/libuv/libuv/pull/1904
Reviewed-By:

unix,win: merge handle flags

Some long overdue refactoring that unifies more of the UNIX and Windows
backends.

PR-URL: https://github.com/libuv/libuv/pull/1904
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>

show more ...

Revision tags: v1.21.0, v1.20.3, v1.20.2, v1.20.1, v1.20.0, v1.19.2, v1.19.1
# 89cbbc89 19-Jan-2018 Mason X

include,src: introduce UV__ERR() macro

Using -errno, -E**, and -pthread_function() can be
error prone, and breaks compatibility with some operating
systems that already negate errno'

include,src: introduce UV__ERR() macro

Using -errno, -E**, and -pthread_function() can be
error prone, and breaks compatibility with some operating
systems that already negate errno's (e.g. Haiku).

This commit adds a UV__ERR() macro that ensures libuv
errors are negative.

Fixes: https://github.com/libuv/help/issues/39
PR-URL: https://github.com/libuv/libuv/pull/1687
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>

show more ...

Revision tags: v1.19.0, v1.18.0, v1.17.0, v1.16.1, v1.16.0, v1.15.0
# 0fcf2d14 30-Sep-2017 Ben Noordhuis

fsevents: watch files with fsevents on macos 10.7+

Adopted from an earlier pull request by Evan Lucas. Avoids opening a
file descriptor per watched file.

Fixes: https://github.

fsevents: watch files with fsevents on macos 10.7+

Adopted from an earlier pull request by Evan Lucas. Avoids opening a
file descriptor per watched file.

Fixes: https://github.com/libuv/libuv/issues/387
PR-URL: https://github.com/libuv/libuv/pull/1572
Refs: https://github.com/libuv/libuv/pull/641
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>

show more ...

Revision tags: v1.14.1, v1.14.0, v1.13.1, v1.13.0, v1.12.0
# 1217832e 15-May-2017 cjihrig

unix: remove FSEventStreamFlushSync() call

This call, in the context of file watching, appears to trigger
assertion warnings on some macOS configurations.

Refs: https://github.c

unix: remove FSEventStreamFlushSync() call

This call, in the context of file watching, appears to trigger
assertion warnings on some macOS configurations.

Refs: https://github.com/nodejs/node/issues/854
Fixes: https://github.com/libuv/libuv/issues/1334
PR-URL: https://github.com/libuv/libuv/pull/1349
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>

show more ...

Revision tags: v1.11.0, v1.10.2, v1.10.1, v1.10.0, v0.10.37, v1.9.1, v1.9.0, v1.8.0
# 0761bfe6 02-Dec-2015 Fedor Indutny

fsevents: fix race on simultaneous init+close

When `uv_fsevents_t` handle is closed immediately after initializing,
there is a possibility that the `CFRunLoop`'s thread will process both

fsevents: fix race on simultaneous init+close

When `uv_fsevents_t` handle is closed immediately after initializing,
there is a possibility that the `CFRunLoop`'s thread will process both
of these events at the same time. `uv__is_active(handle)` will return
`0`, and the `uv_close()` semaphore will be unblocked, leading
to the use after free in node.js.

See: https://github.com/nodejs/node/issues/4091
PR-URL: https://github.com/libuv/libuv/pull/637
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>

show more ...

# 1867a6c1 08-Oct-2015 Ben Noordhuis

src: replace QUEUE_SPLIT with QUEUE_MOVE

All uses of QUEUE_SPLIT in libuv split the list at the head so introduce
a QUEUE_MOVE macro that automates that.

PR-URL: https://github.

src: replace QUEUE_SPLIT with QUEUE_MOVE

All uses of QUEUE_SPLIT in libuv split the list at the head so introduce
a QUEUE_MOVE macro that automates that.

PR-URL: https://github.com/libuv/libuv/pull/565
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>

show more ...

Revision tags: v1.7.5, v1.7.4, v1.7.3, v1.7.2, v1.7.1, v1.7.0, v1.6.1, v1.6.0
# bddd6a84 26-May-2015 Saúl Ibarra Corretgé

core: add ability to customize memory allocator

This patch is composed by the work done in
https://github.com/libuv/libuv/pull/231 and
https://github.com/libuv/libuv/pull/287 plus so

core: add ability to customize memory allocator

This patch is composed by the work done in
https://github.com/libuv/libuv/pull/231 and
https://github.com/libuv/libuv/pull/287 plus some changes by yours
truly.

Thanks @beevik and @mattsta for their work on this!

PR-URL: https://github.com/libuv/libuv/pull/368
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>

show more ...

Revision tags: v1.5.0
# 1f711e4d 29-Apr-2015 Saúl Ibarra Corretgé

Revert "memory: add uv_replace_allocator"

This reverts commit c272f1f1bc0bda625e6441d798c110b4064a6ce2.

The concept will come back to libuv, but it needs some more work.

# c272f1f1 26-Feb-2015 Brett Vickers

memory: add uv_replace_allocator

With uv_replace_allocator, it's possible to override the default
memory allocator's malloc and free calls with functions of the user's
choosing. This

memory: add uv_replace_allocator

With uv_replace_allocator, it's possible to override the default
memory allocator's malloc and free calls with functions of the user's
choosing. This allows libuv to interoperate with projects requiring a
custom memory allocator.

Internally, all calls to malloc and free have been replaced with
uv__malloc and uv__free, respectively. The uv__malloc and uv__free
functions call malloc and free unless they have been overridden by a
previous call to uv_replace_allocator.

As part of this change, the special aligned memory allocations
performed in src/win/fs-event.c have been replaced with standard
allocations. The 4-byte alignment being requested in this file was
unnecessary, since standard allocators already guarantee at least an
8-byte alignment.

PR-URL: https://github.com/libuv/libuv/pull/231
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>

show more ...

Revision tags: v0.10.36, v1.4.2, v0.10.35, v1.4.1, v0.10.34, v1.4.0, v1.3.0, v0.10.33, v1.2.1, v1.2.0, v0.10.32, v1.1.0, v0.10.31, v1.0.2, v0.10.30, v1.0.1, v1.0.0, v0.10.29, v1.0.0-rc2, v1.0.0-rc1
# 94e628fa 11-Sep-2014 Recep ASLANTAS

unix: fix warnings when loading functions with dlsym

Revision tags: v0.11.29, v0.11.28, v0.11.27, v0.10.28, v0.11.26, v0.10.27, v0.11.25, v0.11.24, v0.11.23, v0.10.26
# 0ee3ce98 19-Mar-2014 Saúl Ibarra Corretgé

osx: fix compilation warning

Remove leftover status argument uv_async_t callbacks

Revision tags: v0.11.22, v0.11.21, v0.11.20
# e5bdef9b 23-Feb-2014 Saúl Ibarra Corretgé

fsevent: rename filename field to path

Also, it's now considered private.

Revision tags: v0.10.25, v0.11.19, v0.10.24, v0.11.18, v0.10.23, v0.10.22, v0.11.17, v0.10.21, v0.11.16, v0.10.20
# 646de34f 06-Dec-2013 Fedor Indutny

unix: fix various memory leaks and undef behavior

Kindly suggested by `cppcheck`.

12