#
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. |
#
8fac49d0 |
| 21-Apr-2015 |
Alan Rogers |
unix: open "/dev/null" instead of "/" for emfile_fd We may not have permission to open "/". This fix allows libuv to be used in a OS X app that has sandboxing enabled, without the need f
unix: open "/dev/null" instead of "/" for emfile_fd We may not have permission to open "/". This fix allows libuv to be used in a OS X app that has sandboxing enabled, without the need for a temporary entitlement to allow reading of "/" (Which would never pass app review). In some rare cases "/dev" isn't mounted, so we open "/" as a fallback. PR-URL: https://github.com/libuv/libuv/pull/328 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
show more ...
|
#
d557ad73 |
| 05-Mar-2015 |
Ole André Vadla Ravnås |
darwin: fix size calculation in select() fallback Apple's `fd_set` stores its bits in an array of 32-bit integers, which means `FD_ISSET()` may read out of bounds if we allocate storage
darwin: fix size calculation in select() fallback Apple's `fd_set` stores its bits in an array of 32-bit integers, which means `FD_ISSET()` may read out of bounds if we allocate storage at byte granularity. There's also a chance that the `select()` call could corrupt the heap, although I didn't investigate that. This issue was discovered by LLVM's AddressSanitizer which caught `FD_ISSET()` trying to read out of bounds. PR-URL: https://github.com/libuv/libuv/pull/241 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Fedor Indutny <fedor@indutny.com> Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
show more ...
|
#
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 ...
|
#
19d3d506 |
| 25-Feb-2015 |
Fedor Indutny |
stream: ignore EINVAL for SO_OOBINLINE on OS X Calling `setsockopt()` on shutdown fds/stdio will result in EINVAL. There is not much problem here as the OOB data can't be sent to already
stream: ignore EINVAL for SO_OOBINLINE on OS X Calling `setsockopt()` on shutdown fds/stdio will result in EINVAL. There is not much problem here as the OOB data can't be sent to already shutdown fds. Just ignore it and go on. PR-URL: https://github.com/libuv/libuv/pull/228 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Bert Belder <bertbelder@gmail.com> Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
show more ...
|
#
e19089f7 |
| 24-Feb-2015 |
Fedor Indutny |
stream: use SO_OOBINLINE on OS X In the collaboration with Ben Noordhuis <info@bnoordhuis.nl> and Saúl Ibarra Corretgé <saghul@gmail.com>. Reviewed-By: Saúl Ibarra Corretgé <sag
stream: use SO_OOBINLINE on OS X In the collaboration with Ben Noordhuis <info@bnoordhuis.nl> and Saúl Ibarra Corretgé <saghul@gmail.com>. Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
show more ...
|
#
b36d4ff9 |
| 09-Feb-2015 |
Ben Noordhuis |
unix: implement uv_stream_set_blocking() Commit 393c1c5 ("unix: set non-block mode in uv_{pipe,tcp,udp}_open") causes a regression in the io.js cluster module. The io.js documen
unix: implement uv_stream_set_blocking() Commit 393c1c5 ("unix: set non-block mode in uv_{pipe,tcp,udp}_open") causes a regression in the io.js cluster module. The io.js documentation states that `worker.send()` and `process.send()` are synchronous but they no longer were after upgrading to libuv v1.2.1. The reason they are synchronous is because of backpressure - or rather, lack of backpressure: a slow consumer eventually causes a fast producer to run out of memory because the backlog of pending messages in the producer can grow unchecked. Ergo, implement uv_stream_set_blocking() on UNIX platforms to let io.js enable the old blocking behavior for pipes again. Refs: https://github.com/iojs/io.js/issues/760 PR-URL: https://github.com/libuv/libuv/pull/187 Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
show more ...
|
#
18d58643 |
| 26-Sep-2014 |
Maciej Małecki |
cleanup: remove all dead assignments As pointed out by clang-analyzer. PR-URL: https://github.com/libuv/libuv/pull/13 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewe
cleanup: remove all dead assignments As pointed out by clang-analyzer. PR-URL: https://github.com/libuv/libuv/pull/13 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
show more ...
|
#
873b0260 |
| 09-Dec-2014 |
Saúl Ibarra Corretgé |
unix: stop reading if an error is produced This aligns the behavior with Windows, where users don't need to call `uv_read_stop` or `uv_close` if they get an error in the read callbac
unix: stop reading if an error is produced This aligns the behavior with Windows, where users don't need to call `uv_read_stop` or `uv_close` if they get an error in the read callback. PR-URL: https://github.com/libuv/libuv/pull/47 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
show more ...
|
#
b1bb9053 |
| 09-Dec-2014 |
Saúl Ibarra Corretgé |
unix: reset the reading flag when a stream gets EOF PR-URL: https://github.com/libuv/libuv/pull/47 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> |
#
db6ba5b2 |
| 23-Oct-2014 |
Saúl Ibarra Corretgé |
unix: remove overzealous assert in uv_read_stop Also make it a noop if we weren't reading at all. PR-URL: https://github.com/libuv/libuv/pull/47 Reviewed-By: Ben Noordhuis <info
unix: remove overzealous assert in uv_read_stop Also make it a noop if we weren't reading at all. PR-URL: https://github.com/libuv/libuv/pull/47 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
show more ...
|
#
3aeca36a |
| 28-Nov-2014 |
Joey Geralnik |
unix, windows: fix typos in comments Fix various typos and spelling mistakes in comments. Does not affect any code, just changes comments. PR-URL: https://github.com/libuv/libuv
unix, windows: fix typos in comments Fix various typos and spelling mistakes in comments. Does not affect any code, just changes comments. PR-URL: https://github.com/libuv/libuv/pull/17 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
show more ...
|
#
145b76b8 |
| 07-Sep-2014 |
Fedor Indutny |
darwin: allocate enough space for select() hack `fd_set`s are way too small for `select()` hack when stream's fd is bigger than 1023. Make `fd_set`s a part of `uv__stream_select_t` s
darwin: allocate enough space for select() hack `fd_set`s are way too small for `select()` hack when stream's fd is bigger than 1023. Make `fd_set`s a part of `uv__stream_select_t` structure. fix #1461
show more ...
|
#
d5e6f437 |
| 21-Aug-2014 |
Andrius Bentkus |
unix: fix tcp write after bad connect freezing If the connect wouldn't go off (no such tcp remote or any other failure), the subsequent writes made would not be called. Now we call the w
unix: fix tcp write after bad connect freezing If the connect wouldn't go off (no such tcp remote or any other failure), the subsequent writes made would not be called. Now we call the writes in the queue with ECANCELED if the connect fails. Fix #1432
show more ...
|
#
15521842 |
| 14-Aug-2014 |
Julien Gilli |
unix: read on stream even when UV__POLLHUP set. This fixes a SmartOS specific issue that happens when reading from a stream that is the reading end of a pipe that has been closed by
unix: read on stream even when UV__POLLHUP set. This fixes a SmartOS specific issue that happens when reading from a stream that is the reading end of a pipe that has been closed by the parent process. In this case, a UV__POLLHUP event would be set on the stream and would prevent the event loop from closing it. As a result, the event loop would think there are stil handles open, and leave the process hanging. Fixes #1419.
show more ...
|
#
875814ad |
| 14-Jul-2014 |
Andrius Bentkus |
unix: replace some asserts with returning errors |
#
960eefb3 |
| 06-Jul-2014 |
Andrius Bentkus |
unix: guarantee write queue cb execution order in streams The problem was that the canceled write callbacks were being called before the already written callbacks, even though they w
unix: guarantee write queue cb execution order in streams The problem was that the canceled write callbacks were being called before the already written callbacks, even though they were queued after them.
show more ...
|
#
40ad12e5 |
| 04-Jul-2014 |
Saúl Ibarra Corretgé |
unix: return UV_EAGAIN if uv_try_write cannot write any data |
#
f63e073b |
| 24-Jun-2014 |
Andrius Bentkus |
common: use common uv__count_bufs code Until now it was reimplemented in 2 different places (unix, win). |
#
4ce5470f |
| 12-May-2014 |
Saúl Ibarra Corretgé |
unix: fix uv__open_cloexec usage It returns the fd or the negated errno. |
#
4018f726 |
| 17-Apr-2014 |
Chernyshev Viacheslav |
osx: pass const handle pointer to uv___stream_fd uv___stream_fd does not modify passed parameter, so non-const pointer is not required here. |
#
0ee3ce98 |
| 19-Mar-2014 |
Saúl Ibarra Corretgé |
osx: fix compilation warning Remove leftover status argument uv_async_t callbacks |
#
b597d157 |
| 12-Mar-2014 |
Fedor Indutny |
stream: do not leak `alloc_cb` buffers on error Always pass previously allocated (if any) buffer, when calling `read_cb()` on error. |
#
b1975153 |
| 07-Mar-2014 |
Saúl Ibarra Corretgé |
unix: reopen tty as /dev/tty Reopen the file descriptor when it refers to a tty. This lets us put the tty in non-blocking mode without affecting other processes that share it with us
unix: reopen tty as /dev/tty Reopen the file descriptor when it refers to a tty. This lets us put the tty in non-blocking mode without affecting other processes that share it with us. This brings back commit 31f9fbc, which was reverted in 20bb1bf. The OSX select trick is working now. Original patch by @bnoordhuis
show more ...
|
#
b05a3ee4 |
| 22-Dec-2013 |
Fedor Indutny |
pipe: allow queueing pending handles Introduce `int uv_pipe_pending_count(uv_pipe_t*)` and `uv_handle_type uv_pipe_pending_type(uv_pipe_t*)`. They should be used in IPC pipe's read c
pipe: allow queueing pending handles Introduce `int uv_pipe_pending_count(uv_pipe_t*)` and `uv_handle_type uv_pipe_pending_type(uv_pipe_t*)`. They should be used in IPC pipe's read cb to accept incoming handles: int count = uv_pipe_pending_count(pipe); int i; for (i = 0; i < count; i++) { uv_handle_type type = uv_pipe_pending_type(pipe); /* ... */ uv_accept(...); }
show more ...
|