Skip to content

Commit

Permalink
deps: upgrade libuv to 1.8.0
Browse files Browse the repository at this point in the history
Fixes: #3718
PR-URL: #4276
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
  • Loading branch information
saghul committed Dec 14, 2015
1 parent e0bb118 commit 69b94ec
Show file tree
Hide file tree
Showing 73 changed files with 1,449 additions and 345 deletions.
15 changes: 15 additions & 0 deletions deps/uv/AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -225,3 +225,18 @@ Colin Snover <[email protected]>
Sakthipriyan Vairamani <[email protected]>
Eli Skeggs <[email protected]>
nmushell <[email protected]>
Gireesh Punathil <[email protected]>
Ryan Johnston <[email protected]>
Adam Stylinski <[email protected]>
Nathan Corvino <[email protected]>
Wink Saville <[email protected]>
Angel Leon <[email protected]>
Louis DeJardin <[email protected]>
Imran Iqbal <[email protected]>
Petka Antonov <[email protected]>
Ian Kronquist <[email protected]>
kkdaemon <[email protected]>
Yuval Brik <[email protected]>
Joran Dirk Greef <[email protected]>
Andrey Mazo <[email protected]>
sztomi <[email protected]>
99 changes: 99 additions & 0 deletions deps/uv/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,102 @@
2015.12.15, Version 1.8.0 (Stable), 5467299450ecf61635657557b6e01aaaf6c3fdf4

Changes since version 1.7.5:

* unix: fix memory leak in uv_interface_addresses (Jianghua Yang)

* unix: make uv_guess_handle work properly for AIX (Gireesh Punathil)

* fs: undo uv__req_init when uv__malloc failed (Jianghua Yang)

* build: remove unused 'component' GYP option (Saúl Ibarra Corretgé)

* include: remove duplicate extern declaration (Jianghua Yang)

* win: use the MSVC provided snprintf where possible (Jason Williams)

* win, test: fix compilation warning (Saúl Ibarra Corretgé)

* win: fix compilation with VS < 2012 (Ryan Johnston)

* stream: support empty uv_try_write on unix (Fedor Indutny)

* unix: fix request handle leak in uv__udp_send (Jianghua Yang)

* src: replace QUEUE_SPLIT with QUEUE_MOVE (Ben Noordhuis)

* unix: use QUEUE_MOVE when iterating over lists (Ben Noordhuis)

* unix: squelch harmless valgrind warning (Ben Noordhuis)

* test: don't abort on setrlimit() failure (Ben Noordhuis)

* unix: only undo fs req registration in async mode (Ben Noordhuis)

* unix: fix uv__getiovmax return value (HungMingWu)

* unix: make work with Solaris Studio. (Adam Stylinski)

* test: fix fs_event_watch_file_currentdir flakiness (Santiago Gimeno)

* unix: skip prohibited syscalls on tvOS and watchOS (Nathan Corvino)

* test: use FQDN in getaddrinfo_fail test (Wink Saville)

* docs: clarify documentation of uv_tcp_init_ex (Andrius Bentkus)

* win: fix comment (Miodrag Milanovic)

* doc: fix typo in README (Angel Leon)

* darwin: abort() if (un)locking fs mutex fails (Ben Noordhuis)

* pipe: enable inprocess uv_write2 on Windows (Louis DeJardin)

* win: properly return UV_EBADF when _close() fails (Nicholas Vavilov)

* test: skip process_title for AIX (Imran Iqbal)

* misc: expose handle print APIs (Petka Antonov)

* include: add stdio.h to uv.h (Saúl Ibarra Corretgé)

* misc: remove unnecessary null pointer checks (Ian Kronquist)

* test,freebsd: skip udp_dual_stack if not supported (Santiago Gimeno)

* linux: don't retry dup2/dup3 on EINTR (Ben Noordhuis)

* unix: don't retry dup2/dup3 on EINTR (Ben Noordhuis)

* test: fix -Wtautological-pointer-compare warnings (Saúl Ibarra Corretgé)

* win: map ERROR_BAD_PATHNAME to UV_ENOENT (Tony Kelman)

* test: fix test/test-tty.c for AIX (Imran Iqbal)

* android: support api level less than 21 (kkdaemon)

* fsevents: fix race on simultaneous init+close (Fedor Indutny)

* linux,fs: fix p{read,write}v with a 64bit offset (Saúl Ibarra Corretgé)

* fs: add uv_fs_realpath() (Yuval Brik)

* win: fix path for removed and renamed fs events (Joran Dirk Greef)

* win: do not read more from stream than available (Jeremy Whitlock)

* test: test that uv_close() doesn't corrupt QUEUE (Andrey Mazo)

* unix: fix uv_fs_event_stop() from fs_event_cb (Andrey Mazo)

* test: fix self-deadlocks in thread_rwlock_trylock (Ben Noordhuis)

* src: remove non ascii character (sztomi)

* test: fix test udp_multicast_join6 for AIX (Imran Iqbal)


2015.09.23, Version 1.7.5 (Stable), a8c1136de2cabf25b143021488cbaab05834daa8

Changes since version 1.7.4:
Expand Down
1 change: 1 addition & 0 deletions deps/uv/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ test_run_tests_SOURCES = test/blackhole-server.c \
test/test-poll-closesocket.c \
test/test-poll.c \
test/test-process-title.c \
test/test-queue-foreach-delete.c \
test/test-ref.c \
test/test-run-nowait.c \
test/test-run-once.c \
Expand Down
2 changes: 1 addition & 1 deletion deps/uv/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ Git tags are signed with the developer's key, they can be verified as follows:
$ git verify-tag v1.6.1

Starting with libuv 1.7.0, the tarballs stored in the
[downloads site](http://dist.libuv.org/dist/) are signed and an accomanying
[downloads site](http://dist.libuv.org/dist/) are signed and an accompanying
signature file sit alongside each. Once both the release tarball and the
signature file are downloaded, the file can be verified as follows:

Expand Down
2 changes: 1 addition & 1 deletion deps/uv/appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: v1.7.5.build{build}
version: v1.8.0.build{build}

install:
- cinst -y nsis
Expand Down
1 change: 0 additions & 1 deletion deps/uv/common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
'target_arch%': 'ia32', # set v8's target architecture
'host_arch%': 'ia32', # set v8's host architecture
'uv_library%': 'static_library', # allow override to 'shared_library' for DLL/.so builds
'component%': 'static_library', # NB. these names match with what V8 expects
'msvs_multi_core_compile': '0', # we do enable multicore compiles, but not using the V8 way
},

Expand Down
2 changes: 1 addition & 1 deletion deps/uv/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

AC_PREREQ(2.57)
AC_INIT([libuv], [1.7.5], [https://github.com/libuv/libuv/issues])
AC_INIT([libuv], [1.8.0], [https://github.com/libuv/libuv/issues])
AC_CONFIG_MACRO_DIR([m4])
m4_include([m4/libuv-extra-automake-flags.m4])
m4_include([m4/as_case.m4])
Expand Down
10 changes: 10 additions & 0 deletions deps/uv/docs/src/fs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,16 @@ API
Equivalent to :man:`readlink(2)`.
.. c:function:: int uv_fs_realpath(uv_loop_t* loop, uv_fs_t* req, const char* path, uv_fs_cb cb)
Equivalent to :man:`realpath(3)` on Unix. Windows uses ``GetFinalPathNameByHandle()``.
.. note::
This function is not implemented on Windows XP and Windows Server 2003.
On these systems, UV_ENOSYS is returned.
.. versionadded:: 1.8.0
.. c:function:: int uv_fs_chown(uv_loop_t* loop, uv_fs_t* req, const char* path, uv_uid_t uid, uv_gid_t gid, uv_fs_cb cb)
.. c:function:: int uv_fs_fchown(uv_loop_t* loop, uv_fs_t* req, uv_file file, uv_uid_t uid, uv_gid_t gid, uv_fs_cb cb)
Expand Down
38 changes: 38 additions & 0 deletions deps/uv/docs/src/misc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -288,3 +288,41 @@ API
.. note::
Not every platform can support nanosecond resolution; however, this value will always
be in nanoseconds.
.. c:function:: void uv_print_all_handles(uv_loop_t* loop, FILE* stream)
Prints all handles associated with the given `loop` to the given `stream`.
Example:
::
uv_print_all_handles(uv_default_loop(), stderr);
/*
[--I] signal 0x1a25ea8
[-AI] async 0x1a25cf0
[R--] idle 0x1a7a8c8
*/
The format is `[flags] handle-type handle-address`. For `flags`:

- `R` is printed for a handle that is referenced
- `A` is printed for a handle that is active
- `I` is printed for a handle that is internal

.. warning::
This function is meant for ad hoc debugging, there is no API/ABI
stability guarantees.

.. versionadded:: 1.8.0

.. c:function:: void uv_print_active_handles(uv_loop_t* loop, FILE* stream)
This is the same as :c:func:`uv_print_all_handles` except only active handles
are printed.
.. warning::
This function is meant for ad hoc debugging, there is no API/ABI
stability guarantees.
.. versionadded:: 1.8.0
2 changes: 1 addition & 1 deletion deps/uv/docs/src/tcp.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ API
.. c:function:: int uv_tcp_init_ex(uv_loop_t* loop, uv_tcp_t* handle, unsigned int flags)
Initialize the handle with the specified flags. At the moment the lower 8 bits
Initialize the handle with the specified flags. At the moment only the lower 8 bits
of the `flags` parameter are used as the socket domain. A socket will be created
for the given domain. If the specified domain is ``AF_UNSPEC`` no socket is created,
just like :c:func:`uv_tcp_init`.
Expand Down
3 changes: 0 additions & 3 deletions deps/uv/gyp_uv.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,6 @@ def run_gyp(args):
if not any(a.startswith('-Duv_library=') for a in args):
args.append('-Duv_library=static_library')

if not any(a.startswith('-Dcomponent=') for a in args):
args.append('-Dcomponent=static_library')

# Some platforms (OpenBSD for example) don't have multiprocessing.synchronize
# so gyp must be run with --no-parallel
if not gyp_parallel_support:
Expand Down
4 changes: 2 additions & 2 deletions deps/uv/include/uv-version.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
*/

#define UV_VERSION_MAJOR 1
#define UV_VERSION_MINOR 7
#define UV_VERSION_PATCH 5
#define UV_VERSION_MINOR 8
#define UV_VERSION_PATCH 0
#define UV_VERSION_IS_RELEASE 1
#define UV_VERSION_SUFFIX ""

Expand Down
14 changes: 12 additions & 2 deletions deps/uv/include/uv.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ extern "C" {
#include "uv-errno.h"
#include "uv-version.h"
#include <stddef.h>
#include <stdio.h>

#if defined(_MSC_VER) && _MSC_VER < 1600
# include "stdint-msvc2008.h"
Expand Down Expand Up @@ -424,6 +425,10 @@ UV_EXTERN int uv_is_active(const uv_handle_t* handle);

UV_EXTERN void uv_walk(uv_loop_t* loop, uv_walk_cb walk_cb, void* arg);

/* Helpers for ad hoc debugging, no API/ABI stability guaranteed. */
UV_EXTERN void uv_print_all_handles(uv_loop_t* loop, FILE* stream);
UV_EXTERN void uv_print_active_handles(uv_loop_t* loop, FILE* stream);

UV_EXTERN void uv_close(uv_handle_t* handle, uv_close_cb close_cb);

UV_EXTERN int uv_send_buffer_size(uv_handle_t* handle, int* value);
Expand Down Expand Up @@ -1083,7 +1088,8 @@ typedef enum {
UV_FS_SYMLINK,
UV_FS_READLINK,
UV_FS_CHOWN,
UV_FS_FCHOWN
UV_FS_FCHOWN,
UV_FS_REALPATH
} uv_fs_type;

/* uv_fs_t is a subclass of uv_req_t. */
Expand Down Expand Up @@ -1235,6 +1241,10 @@ UV_EXTERN int uv_fs_readlink(uv_loop_t* loop,
uv_fs_t* req,
const char* path,
uv_fs_cb cb);
UV_EXTERN int uv_fs_realpath(uv_loop_t* loop,
uv_fs_t* req,
const char* path,
uv_fs_cb cb);
UV_EXTERN int uv_fs_fchmod(uv_loop_t* loop,
uv_fs_t* req,
uv_file file,
Expand Down Expand Up @@ -1363,7 +1373,7 @@ UV_EXTERN int uv_chdir(const char* dir);
UV_EXTERN uint64_t uv_get_free_memory(void);
UV_EXTERN uint64_t uv_get_total_memory(void);

UV_EXTERN extern uint64_t uv_hrtime(void);
UV_EXTERN uint64_t uv_hrtime(void);

UV_EXTERN void uv_disable_stdio_inheritance(void);

Expand Down
4 changes: 0 additions & 4 deletions deps/uv/src/inet.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,7 @@ static int inet_ntop4(const unsigned char *src, char *dst, size_t size) {
char tmp[UV__INET_ADDRSTRLEN];
int l;

#ifndef _WIN32
l = snprintf(tmp, sizeof(tmp), fmt, src[0], src[1], src[2], src[3]);
#else
l = _snprintf(tmp, sizeof(tmp), fmt, src[0], src[1], src[2], src[3]);
#endif
if (l <= 0 || (size_t) l >= size) {
return UV_ENOSPC;
}
Expand Down
14 changes: 14 additions & 0 deletions deps/uv/src/queue.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ typedef void *QUEUE[2];
#define QUEUE_DATA(ptr, type, field) \
((type *) ((char *) (ptr) - offsetof(type, field)))

/* Important note: mutating the list while QUEUE_FOREACH is
* iterating over its elements results in undefined behavior.
*/
#define QUEUE_FOREACH(q, h) \
for ((q) = QUEUE_NEXT(h); (q) != (h); (q) = QUEUE_NEXT(q))

Expand Down Expand Up @@ -66,6 +69,17 @@ typedef void *QUEUE[2];
} \
while (0)

#define QUEUE_MOVE(h, n) \
do { \
if (QUEUE_EMPTY(h)) \
QUEUE_INIT(n); \
else { \
QUEUE* q = QUEUE_HEAD(h); \
QUEUE_SPLIT(h, q, n); \
} \
} \
while (0)

#define QUEUE_INSERT_HEAD(h, q) \
do { \
QUEUE_NEXT(q) = QUEUE_NEXT(h); \
Expand Down
7 changes: 1 addition & 6 deletions deps/uv/src/threadpool.c
Original file line number Diff line number Diff line change
Expand Up @@ -223,13 +223,8 @@ void uv__work_done(uv_async_t* handle) {
int err;

loop = container_of(handle, uv_loop_t, wq_async);
QUEUE_INIT(&wq);

uv_mutex_lock(&loop->wq_mutex);
if (!QUEUE_EMPTY(&loop->wq)) {
q = QUEUE_HEAD(&loop->wq);
QUEUE_SPLIT(&loop->wq, q, &wq);
}
QUEUE_MOVE(&loop->wq, &wq);
uv_mutex_unlock(&loop->wq_mutex);

while (!QUEUE_EMPTY(&wq)) {
Expand Down
2 changes: 1 addition & 1 deletion deps/uv/src/unix/android-ifaddrs.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
Copyright (c) 2013, Kenneth MacKay
Copyright (c) 2014, Emergya (Cloud4all, FP7/2007-2013 grant agreement 289016)
Copyright (c) 2014, Emergya (Cloud4all, FP7/2007-2013 grant agreement #289016)
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
Expand Down
8 changes: 7 additions & 1 deletion deps/uv/src/unix/async.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,18 @@ void uv__async_close(uv_async_t* handle) {
static void uv__async_event(uv_loop_t* loop,
struct uv__async* w,
unsigned int nevents) {
QUEUE queue;
QUEUE* q;
uv_async_t* h;

QUEUE_FOREACH(q, &loop->async_handles) {
QUEUE_MOVE(&loop->async_handles, &queue);
while (!QUEUE_EMPTY(&queue)) {
q = QUEUE_HEAD(&queue);
h = QUEUE_DATA(q, uv_async_t, queue);

QUEUE_REMOVE(q);
QUEUE_INSERT_TAIL(&loop->async_handles, q);

if (cmpxchgi(&h->pending, 1, 0) == 0)
continue;

Expand Down
5 changes: 5 additions & 0 deletions deps/uv/src/unix/atomic-ops.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@

#include "internal.h" /* UV_UNUSED */

#if defined(__SUNPRO_C) || defined(__SUNPRO_CC)
#include <atomic.h>
#define __sync_val_compare_and_swap(p, o, n) atomic_cas_ptr(p, o, n)
#endif

UV_UNUSED(static int cmpxchgi(int* ptr, int oldval, int newval));
UV_UNUSED(static long cmpxchgl(long* ptr, long oldval, long newval));
UV_UNUSED(static void cpu_relax(void));
Expand Down
Loading

0 comments on commit 69b94ec

Please sign in to comment.