Skip to content

Commit 69b94ec

Browse files
committed
deps: upgrade libuv to 1.8.0
Fixes: #3718 PR-URL: #4276 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
1 parent e0bb118 commit 69b94ec

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+1449
-345
lines changed

deps/uv/AUTHORS

+15
Original file line numberDiff line numberDiff line change
@@ -225,3 +225,18 @@ Colin Snover <[email protected]>
225225
Sakthipriyan Vairamani <[email protected]>
226226
Eli Skeggs <[email protected]>
227227
228+
Gireesh Punathil <[email protected]>
229+
Ryan Johnston <[email protected]>
230+
Adam Stylinski <[email protected]>
231+
Nathan Corvino <[email protected]>
232+
Wink Saville <[email protected]>
233+
Angel Leon <[email protected]>
234+
Louis DeJardin <[email protected]>
235+
Imran Iqbal <[email protected]>
236+
Petka Antonov <[email protected]>
237+
Ian Kronquist <[email protected]>
238+
239+
Yuval Brik <[email protected]>
240+
Joran Dirk Greef <[email protected]>
241+
Andrey Mazo <[email protected]>
242+

deps/uv/ChangeLog

+99
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,102 @@
1+
2015.12.15, Version 1.8.0 (Stable), 5467299450ecf61635657557b6e01aaaf6c3fdf4
2+
3+
Changes since version 1.7.5:
4+
5+
* unix: fix memory leak in uv_interface_addresses (Jianghua Yang)
6+
7+
* unix: make uv_guess_handle work properly for AIX (Gireesh Punathil)
8+
9+
* fs: undo uv__req_init when uv__malloc failed (Jianghua Yang)
10+
11+
* build: remove unused 'component' GYP option (Saúl Ibarra Corretgé)
12+
13+
* include: remove duplicate extern declaration (Jianghua Yang)
14+
15+
* win: use the MSVC provided snprintf where possible (Jason Williams)
16+
17+
* win, test: fix compilation warning (Saúl Ibarra Corretgé)
18+
19+
* win: fix compilation with VS < 2012 (Ryan Johnston)
20+
21+
* stream: support empty uv_try_write on unix (Fedor Indutny)
22+
23+
* unix: fix request handle leak in uv__udp_send (Jianghua Yang)
24+
25+
* src: replace QUEUE_SPLIT with QUEUE_MOVE (Ben Noordhuis)
26+
27+
* unix: use QUEUE_MOVE when iterating over lists (Ben Noordhuis)
28+
29+
* unix: squelch harmless valgrind warning (Ben Noordhuis)
30+
31+
* test: don't abort on setrlimit() failure (Ben Noordhuis)
32+
33+
* unix: only undo fs req registration in async mode (Ben Noordhuis)
34+
35+
* unix: fix uv__getiovmax return value (HungMingWu)
36+
37+
* unix: make work with Solaris Studio. (Adam Stylinski)
38+
39+
* test: fix fs_event_watch_file_currentdir flakiness (Santiago Gimeno)
40+
41+
* unix: skip prohibited syscalls on tvOS and watchOS (Nathan Corvino)
42+
43+
* test: use FQDN in getaddrinfo_fail test (Wink Saville)
44+
45+
* docs: clarify documentation of uv_tcp_init_ex (Andrius Bentkus)
46+
47+
* win: fix comment (Miodrag Milanovic)
48+
49+
* doc: fix typo in README (Angel Leon)
50+
51+
* darwin: abort() if (un)locking fs mutex fails (Ben Noordhuis)
52+
53+
* pipe: enable inprocess uv_write2 on Windows (Louis DeJardin)
54+
55+
* win: properly return UV_EBADF when _close() fails (Nicholas Vavilov)
56+
57+
* test: skip process_title for AIX (Imran Iqbal)
58+
59+
* misc: expose handle print APIs (Petka Antonov)
60+
61+
* include: add stdio.h to uv.h (Saúl Ibarra Corretgé)
62+
63+
* misc: remove unnecessary null pointer checks (Ian Kronquist)
64+
65+
* test,freebsd: skip udp_dual_stack if not supported (Santiago Gimeno)
66+
67+
* linux: don't retry dup2/dup3 on EINTR (Ben Noordhuis)
68+
69+
* unix: don't retry dup2/dup3 on EINTR (Ben Noordhuis)
70+
71+
* test: fix -Wtautological-pointer-compare warnings (Saúl Ibarra Corretgé)
72+
73+
* win: map ERROR_BAD_PATHNAME to UV_ENOENT (Tony Kelman)
74+
75+
* test: fix test/test-tty.c for AIX (Imran Iqbal)
76+
77+
* android: support api level less than 21 (kkdaemon)
78+
79+
* fsevents: fix race on simultaneous init+close (Fedor Indutny)
80+
81+
* linux,fs: fix p{read,write}v with a 64bit offset (Saúl Ibarra Corretgé)
82+
83+
* fs: add uv_fs_realpath() (Yuval Brik)
84+
85+
* win: fix path for removed and renamed fs events (Joran Dirk Greef)
86+
87+
* win: do not read more from stream than available (Jeremy Whitlock)
88+
89+
* test: test that uv_close() doesn't corrupt QUEUE (Andrey Mazo)
90+
91+
* unix: fix uv_fs_event_stop() from fs_event_cb (Andrey Mazo)
92+
93+
* test: fix self-deadlocks in thread_rwlock_trylock (Ben Noordhuis)
94+
95+
* src: remove non ascii character (sztomi)
96+
97+
* test: fix test udp_multicast_join6 for AIX (Imran Iqbal)
98+
99+
1100
2015.09.23, Version 1.7.5 (Stable), a8c1136de2cabf25b143021488cbaab05834daa8
2101

3102
Changes since version 1.7.4:

deps/uv/Makefile.am

+1
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@ test_run_tests_SOURCES = test/blackhole-server.c \
200200
test/test-poll-closesocket.c \
201201
test/test-poll.c \
202202
test/test-process-title.c \
203+
test/test-queue-foreach-delete.c \
203204
test/test-ref.c \
204205
test/test-run-nowait.c \
205206
test/test-run-once.c \

deps/uv/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ Git tags are signed with the developer's key, they can be verified as follows:
119119
$ git verify-tag v1.6.1
120120

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

deps/uv/appveyor.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: v1.7.5.build{build}
1+
version: v1.8.0.build{build}
22

33
install:
44
- cinst -y nsis

deps/uv/common.gypi

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
'target_arch%': 'ia32', # set v8's target architecture
55
'host_arch%': 'ia32', # set v8's host architecture
66
'uv_library%': 'static_library', # allow override to 'shared_library' for DLL/.so builds
7-
'component%': 'static_library', # NB. these names match with what V8 expects
87
'msvs_multi_core_compile': '0', # we do enable multicore compiles, but not using the V8 way
98
},
109

deps/uv/configure.ac

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
1414

1515
AC_PREREQ(2.57)
16-
AC_INIT([libuv], [1.7.5], [https://github.com/libuv/libuv/issues])
16+
AC_INIT([libuv], [1.8.0], [https://github.com/libuv/libuv/issues])
1717
AC_CONFIG_MACRO_DIR([m4])
1818
m4_include([m4/libuv-extra-automake-flags.m4])
1919
m4_include([m4/as_case.m4])

deps/uv/docs/src/fs.rst

+10
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,16 @@ API
279279
280280
Equivalent to :man:`readlink(2)`.
281281
282+
.. c:function:: int uv_fs_realpath(uv_loop_t* loop, uv_fs_t* req, const char* path, uv_fs_cb cb)
283+
284+
Equivalent to :man:`realpath(3)` on Unix. Windows uses ``GetFinalPathNameByHandle()``.
285+
286+
.. note::
287+
This function is not implemented on Windows XP and Windows Server 2003.
288+
On these systems, UV_ENOSYS is returned.
289+
290+
.. versionadded:: 1.8.0
291+
282292
.. 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)
283293
.. 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)
284294

deps/uv/docs/src/misc.rst

+38
Original file line numberDiff line numberDiff line change
@@ -288,3 +288,41 @@ API
288288
.. note::
289289
Not every platform can support nanosecond resolution; however, this value will always
290290
be in nanoseconds.
291+
292+
.. c:function:: void uv_print_all_handles(uv_loop_t* loop, FILE* stream)
293+
294+
Prints all handles associated with the given `loop` to the given `stream`.
295+
296+
Example:
297+
298+
::
299+
300+
uv_print_all_handles(uv_default_loop(), stderr);
301+
/*
302+
[--I] signal 0x1a25ea8
303+
[-AI] async 0x1a25cf0
304+
[R--] idle 0x1a7a8c8
305+
*/
306+
307+
The format is `[flags] handle-type handle-address`. For `flags`:
308+
309+
- `R` is printed for a handle that is referenced
310+
- `A` is printed for a handle that is active
311+
- `I` is printed for a handle that is internal
312+
313+
.. warning::
314+
This function is meant for ad hoc debugging, there is no API/ABI
315+
stability guarantees.
316+
317+
.. versionadded:: 1.8.0
318+
319+
.. c:function:: void uv_print_active_handles(uv_loop_t* loop, FILE* stream)
320+
321+
This is the same as :c:func:`uv_print_all_handles` except only active handles
322+
are printed.
323+
324+
.. warning::
325+
This function is meant for ad hoc debugging, there is no API/ABI
326+
stability guarantees.
327+
328+
.. versionadded:: 1.8.0

deps/uv/docs/src/tcp.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ API
3434
3535
.. c:function:: int uv_tcp_init_ex(uv_loop_t* loop, uv_tcp_t* handle, unsigned int flags)
3636
37-
Initialize the handle with the specified flags. At the moment the lower 8 bits
37+
Initialize the handle with the specified flags. At the moment only the lower 8 bits
3838
of the `flags` parameter are used as the socket domain. A socket will be created
3939
for the given domain. If the specified domain is ``AF_UNSPEC`` no socket is created,
4040
just like :c:func:`uv_tcp_init`.

deps/uv/gyp_uv.py

-3
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,6 @@ def run_gyp(args):
8383
if not any(a.startswith('-Duv_library=') for a in args):
8484
args.append('-Duv_library=static_library')
8585

86-
if not any(a.startswith('-Dcomponent=') for a in args):
87-
args.append('-Dcomponent=static_library')
88-
8986
# Some platforms (OpenBSD for example) don't have multiprocessing.synchronize
9087
# so gyp must be run with --no-parallel
9188
if not gyp_parallel_support:

deps/uv/include/uv-version.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@
3131
*/
3232

3333
#define UV_VERSION_MAJOR 1
34-
#define UV_VERSION_MINOR 7
35-
#define UV_VERSION_PATCH 5
34+
#define UV_VERSION_MINOR 8
35+
#define UV_VERSION_PATCH 0
3636
#define UV_VERSION_IS_RELEASE 1
3737
#define UV_VERSION_SUFFIX ""
3838

deps/uv/include/uv.h

+12-2
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ extern "C" {
4848
#include "uv-errno.h"
4949
#include "uv-version.h"
5050
#include <stddef.h>
51+
#include <stdio.h>
5152

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

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

428+
/* Helpers for ad hoc debugging, no API/ABI stability guaranteed. */
429+
UV_EXTERN void uv_print_all_handles(uv_loop_t* loop, FILE* stream);
430+
UV_EXTERN void uv_print_active_handles(uv_loop_t* loop, FILE* stream);
431+
427432
UV_EXTERN void uv_close(uv_handle_t* handle, uv_close_cb close_cb);
428433

429434
UV_EXTERN int uv_send_buffer_size(uv_handle_t* handle, int* value);
@@ -1083,7 +1088,8 @@ typedef enum {
10831088
UV_FS_SYMLINK,
10841089
UV_FS_READLINK,
10851090
UV_FS_CHOWN,
1086-
UV_FS_FCHOWN
1091+
UV_FS_FCHOWN,
1092+
UV_FS_REALPATH
10871093
} uv_fs_type;
10881094

10891095
/* uv_fs_t is a subclass of uv_req_t. */
@@ -1235,6 +1241,10 @@ UV_EXTERN int uv_fs_readlink(uv_loop_t* loop,
12351241
uv_fs_t* req,
12361242
const char* path,
12371243
uv_fs_cb cb);
1244+
UV_EXTERN int uv_fs_realpath(uv_loop_t* loop,
1245+
uv_fs_t* req,
1246+
const char* path,
1247+
uv_fs_cb cb);
12381248
UV_EXTERN int uv_fs_fchmod(uv_loop_t* loop,
12391249
uv_fs_t* req,
12401250
uv_file file,
@@ -1363,7 +1373,7 @@ UV_EXTERN int uv_chdir(const char* dir);
13631373
UV_EXTERN uint64_t uv_get_free_memory(void);
13641374
UV_EXTERN uint64_t uv_get_total_memory(void);
13651375

1366-
UV_EXTERN extern uint64_t uv_hrtime(void);
1376+
UV_EXTERN uint64_t uv_hrtime(void);
13671377

13681378
UV_EXTERN void uv_disable_stdio_inheritance(void);
13691379

deps/uv/src/inet.c

-4
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,7 @@ static int inet_ntop4(const unsigned char *src, char *dst, size_t size) {
5555
char tmp[UV__INET_ADDRSTRLEN];
5656
int l;
5757

58-
#ifndef _WIN32
5958
l = snprintf(tmp, sizeof(tmp), fmt, src[0], src[1], src[2], src[3]);
60-
#else
61-
l = _snprintf(tmp, sizeof(tmp), fmt, src[0], src[1], src[2], src[3]);
62-
#endif
6359
if (l <= 0 || (size_t) l >= size) {
6460
return UV_ENOSPC;
6561
}

deps/uv/src/queue.h

+14
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ typedef void *QUEUE[2];
3030
#define QUEUE_DATA(ptr, type, field) \
3131
((type *) ((char *) (ptr) - offsetof(type, field)))
3232

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

@@ -66,6 +69,17 @@ typedef void *QUEUE[2];
6669
} \
6770
while (0)
6871

72+
#define QUEUE_MOVE(h, n) \
73+
do { \
74+
if (QUEUE_EMPTY(h)) \
75+
QUEUE_INIT(n); \
76+
else { \
77+
QUEUE* q = QUEUE_HEAD(h); \
78+
QUEUE_SPLIT(h, q, n); \
79+
} \
80+
} \
81+
while (0)
82+
6983
#define QUEUE_INSERT_HEAD(h, q) \
7084
do { \
7185
QUEUE_NEXT(q) = QUEUE_NEXT(h); \

deps/uv/src/threadpool.c

+1-6
Original file line numberDiff line numberDiff line change
@@ -223,13 +223,8 @@ void uv__work_done(uv_async_t* handle) {
223223
int err;
224224

225225
loop = container_of(handle, uv_loop_t, wq_async);
226-
QUEUE_INIT(&wq);
227-
228226
uv_mutex_lock(&loop->wq_mutex);
229-
if (!QUEUE_EMPTY(&loop->wq)) {
230-
q = QUEUE_HEAD(&loop->wq);
231-
QUEUE_SPLIT(&loop->wq, q, &wq);
232-
}
227+
QUEUE_MOVE(&loop->wq, &wq);
233228
uv_mutex_unlock(&loop->wq_mutex);
234229

235230
while (!QUEUE_EMPTY(&wq)) {

deps/uv/src/unix/android-ifaddrs.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
Copyright (c) 2013, Kenneth MacKay
3-
Copyright (c) 2014, Emergya (Cloud4all, FP7/2007-2013 grant agreement 289016)
3+
Copyright (c) 2014, Emergya (Cloud4all, FP7/2007-2013 grant agreement #289016)
44
All rights reserved.
55
66
Redistribution and use in source and binary forms, with or without modification,

deps/uv/src/unix/async.c

+7-1
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,18 @@ void uv__async_close(uv_async_t* handle) {
7878
static void uv__async_event(uv_loop_t* loop,
7979
struct uv__async* w,
8080
unsigned int nevents) {
81+
QUEUE queue;
8182
QUEUE* q;
8283
uv_async_t* h;
8384

84-
QUEUE_FOREACH(q, &loop->async_handles) {
85+
QUEUE_MOVE(&loop->async_handles, &queue);
86+
while (!QUEUE_EMPTY(&queue)) {
87+
q = QUEUE_HEAD(&queue);
8588
h = QUEUE_DATA(q, uv_async_t, queue);
8689

90+
QUEUE_REMOVE(q);
91+
QUEUE_INSERT_TAIL(&loop->async_handles, q);
92+
8793
if (cmpxchgi(&h->pending, 1, 0) == 0)
8894
continue;
8995

deps/uv/src/unix/atomic-ops.h

+5
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@
1818

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

21+
#if defined(__SUNPRO_C) || defined(__SUNPRO_CC)
22+
#include <atomic.h>
23+
#define __sync_val_compare_and_swap(p, o, n) atomic_cas_ptr(p, o, n)
24+
#endif
25+
2126
UV_UNUSED(static int cmpxchgi(int* ptr, int oldval, int newval));
2227
UV_UNUSED(static long cmpxchgl(long* ptr, long oldval, long newval));
2328
UV_UNUSED(static void cpu_relax(void));

0 commit comments

Comments
 (0)