Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit c0eadef

Browse filesBrowse files
cjihrigdanielleadams
authored andcommitted
deps: upgrade to libuv 1.41.0
Notable changes: - The IBM i platform has been promoted to a Tier 2 platform. - libuv is now built with `-fno-strict-aliasing`, and recommends that projects using libuv do the same. - `uv_fs_mkdir()` now returns `UV_EINVAL` for invalid directory names on Windows. - `uv_uptime()` now returns the correct value on OpenVZ containers. - Windows 8 is the new minimum supported version of Windows. - Bind errors are now reported from `uv_tcp_connect()`. - The `uv_pipe()` function has been added. - The `uv_socketpair()` function has been added. - `uv_read_start()` error handling has been unified across Windows and Unix. PR-URL: #37360 Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
1 parent 05a16e7 commit c0eadef
Copy full SHA for c0eadef

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Dismiss banner
Expand file treeCollapse file tree

67 files changed

+1520
-576
lines changed
Open diff view settings
Collapse file

‎deps/uv/.mailmap‎

Copy file name to clipboardExpand all lines: deps/uv/.mailmap
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ Nicholas Vavilov <vvnicholas@gmail.com>
3232
Nick Logan <ugexe@cpan.org> <nlogan@gmail.com>
3333
Rasmus Christian Pedersen <zerhacken@yahoo.com>
3434
Rasmus Christian Pedersen <zerhacken@yahoo.com> <ruysch@outlook.com>
35+
Richard Lau <rlau@redhat.com> <riclau@uk.ibm.com>
3536
Robert Mustacchi <rm@joyent.com> <rm@fingolfin.org>
3637
Ryan Dahl <ryan@joyent.com> <ry@tinyclouds.org>
3738
Ryan Emery <seebees@gmail.com>
@@ -47,6 +48,7 @@ Timothy J. Fontaine <tjfontaine@gmail.com>
4748
Yasuhiro Matsumoto <mattn.jp@gmail.com>
4849
Yazhong Liu <yorkiefixer@gmail.com>
4950
Yuki Okumura <mjt@cltn.org>
51+
cjihrig <cjihrig@gmail.com>
5052
gengjiawen <technicalcute@gmail.com>
5153
jBarz <jBarz@users.noreply.github.com> <jbarboza@ca.ibm.com>
5254
jBarz <jBarz@users.noreply.github.com> <jbarz@users.noreply.github.com>
Collapse file

‎deps/uv/AUTHORS‎

Copy file name to clipboardExpand all lines: deps/uv/AUTHORS
+12-1Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ guworks <ground.up.works@gmail.com>
212212
RossBencina <rossb@audiomulch.com>
213213
Roger A. Light <roger@atchoo.org>
214214
chenttuuvv <chenttuuvv@yahoo.com>
215-
Richard Lau <riclau@uk.ibm.com>
215+
Richard Lau <rlau@redhat.com>
216216
ronkorving <rkorving@wizcorp.jp>
217217
Corbin Simpson <MostAwesomeDude@gmail.com>
218218
Zachary Hamm <zsh@imipolexg.org>
@@ -448,3 +448,14 @@ Aleksej Lebedev <root@zta.lk>
448448
Nikolay Mitev <github@hmel.org>
449449
Ulrik Strid <ulrik.strid@outlook.com>
450450
Elad Lahav <elahav@qnx.com>
451+
Elad Nachmias <eladn@pazam.net>
452+
Darshan Sen <raisinten@gmail.com>
453+
Simon Kadisch <simon.kadisch@k13-engineering.at>
454+
Momtchil Momtchev <momtchil@momtchev.com>
455+
Ethel Weston <66453757+ethelweston@users.noreply.github.com>
456+
Drew DeVault <sir@cmpwn.com>
457+
Mark Klein <klein@cscs.ch>
458+
schamberg97 <50446906+schamberg97@users.noreply.github.com>
459+
Bob Weinand <bobwei9@hotmail.com>
460+
Issam E. Maghni <issam.e.maghni@mailbox.org>
461+
Juan Pablo Canepa <jpcanepa@gmail.com>
Collapse file

‎deps/uv/CMakeLists.txt‎

Copy file name to clipboardExpand all lines: deps/uv/CMakeLists.txt
+12-2Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,13 @@ if(QEMU)
3030
add_definitions(-D__QEMU__=1)
3131
endif()
3232

33+
option(ASAN "Enable AddressSanitizer (ASan)" OFF)
34+
if(ASAN AND CMAKE_C_COMPILER_ID MATCHES "AppleClang|GNU|Clang")
35+
add_definitions(-D__ASAN__=1)
36+
set (CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address")
37+
set (CMAKE_LINKER_FLAGS_DEBUG "${CMAKE_LINKER_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address")
38+
endif()
39+
3340
# Compiler check
3441
string(CONCAT is-msvc $<OR:
3542
$<C_COMPILER_ID:MSVC>,
@@ -95,6 +102,9 @@ list(APPEND uv_cflags ${lint-no-conditional-assignment-msvc})
95102
list(APPEND uv_cflags ${lint-no-unsafe-msvc})
96103
list(APPEND uv_cflags ${lint-utf8-msvc} )
97104

105+
check_c_compiler_flag(-fno-strict-aliasing UV_F_STRICT_ALIASING)
106+
list(APPEND uv_cflags $<$<BOOL:${UV_F_STRICT_ALIASING}>:-fno-strict-aliasing>)
107+
98108
set(uv_sources
99109
src/fs-poll.c
100110
src/idna.c
@@ -108,7 +118,7 @@ set(uv_sources
108118
src/version.c)
109119

110120
if(WIN32)
111-
list(APPEND uv_defines WIN32_LEAN_AND_MEAN _WIN32_WINNT=0x0600)
121+
list(APPEND uv_defines WIN32_LEAN_AND_MEAN _WIN32_WINNT=0x0602)
112122
list(APPEND uv_libraries
113123
psapi
114124
user32
@@ -318,7 +328,6 @@ if(CMAKE_SYSTEM_NAME STREQUAL "QNX")
318328
src/unix/bsd-ifaddrs.c
319329
src/unix/no-proctitle.c
320330
src/unix/no-fsevents.c)
321-
list(APPEND uv_cflags -fno-strict-aliasing)
322331
list(APPEND uv_libraries socket)
323332
endif()
324333

@@ -466,6 +475,7 @@ if(LIBUV_BUILD_TESTS)
466475
test/test-poll-close-doesnt-corrupt-stack.c
467476
test/test-poll-close.c
468477
test/test-poll-closesocket.c
478+
test/test-poll-multiple-handles.c
469479
test/test-poll-oob.c
470480
test/test-poll.c
471481
test/test-process-priority.c
Collapse file

‎deps/uv/ChangeLog‎

Copy file name to clipboardExpand all lines: deps/uv/ChangeLog
+79Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,82 @@
1+
2021.02.14, Version 1.41.0 (Stable), 1dff88e5161cba5c59276d2070d2e304e4dcb242
2+
3+
Changes since version 1.40.0:
4+
5+
* mailmap: update contact information for richardlau (Richard Lau)
6+
7+
* build: add asan checks (gengjiawen)
8+
9+
* unix: report bind error in uv_tcp_connect() (Ben Noordhuis)
10+
11+
* doc: uv_tcp_bind() never returns UV_EADDRINUSE (Ben Noordhuis)
12+
13+
* test: fix pump and tcp_write_batch benchmarks (Santiago Gimeno)
14+
15+
* doc: mark IBM i as Tier 2 support (Jesse Gorzinski)
16+
17+
* doc,poll: add notes (repeated cb & cancel pending cb) (Elad Nachmias)
18+
19+
* linux: fix -Wincompatible-pointer-types warning (Ben Noordhuis)
20+
21+
* linux: fix -Wsign-compare warning (Ben Noordhuis)
22+
23+
* android: add system call api guards (Ben Noordhuis)
24+
25+
* unix,win: harmonize uv_read_start() error handling (Ben Noordhuis)
26+
27+
* unix,win: more uv_read_start() argument validation (Ben Noordhuis)
28+
29+
* build: turn on -fno-strict-aliasing (Ben Noordhuis)
30+
31+
* stream: add uv_pipe and uv_socketpair to the API (Jameson Nash)
32+
33+
* unix,win: initialize timer `timeout` field (Ben Noordhuis)
34+
35+
* bsd-ifaddrs: improve comments (Darshan Sen)
36+
37+
* test: remove unnecessary uv_fs_stat() calls (Ben Noordhuis)
38+
39+
* fs: fix utime/futime timestamp rounding errors (Ben Noordhuis)
40+
41+
* test: ensure reliable floating point comparison (Jameson Nash)
42+
43+
* unix,fs: fix uv_fs_sendfile() (Santiago Gimeno)
44+
45+
* unix: fix uv_fs_stat when using statx (Simon Kadisch)
46+
47+
* linux,macos: fix uv_set_process_title regression (Momtchil Momtchev)
48+
49+
* doc: clarify UDP errors and recvmmsg (Ethel Weston)
50+
51+
* test-getaddrinfo: use example.invalid (Drew DeVault)
52+
53+
* Revert "build: fix android autotools build" (Bernardo Ramos)
54+
55+
* unix,fs: on DVS fs, statx returns EOPNOTSUPP (Mark Klein)
56+
57+
* win, fs: mkdir really return UV_EINVAL for invalid names (Nicholas Vavilov)
58+
59+
* tools: migrate tools/make_dist_html.py to python3 (Dominique Dumont)
60+
61+
* unix: fix uv_uptime() on linux (schamberg97)
62+
63+
* unix: check for partial copy_file_range support (Momtchil Momtchev)
64+
65+
* win: bump minimum supported version to windows 8 (Ben Noordhuis)
66+
67+
* poll,unix: ensure safety of rapid fd reuse (Bob Weinand)
68+
69+
* test: fix some warnings (Issam E. Maghni)
70+
71+
* unix: fix uv_uptime() regression (Santiago Gimeno)
72+
73+
* doc: fix versionadded metadata (cjihrig)
74+
75+
* test: fix 'incompatible pointer types' warnings (cjihrig)
76+
77+
* unix: check for EXDEV in uv__fs_sendfile() (Darshan Sen)
78+
79+
180
2020.09.26, Version 1.40.0 (Stable), 4e69e333252693bd82d6338d6124f0416538dbfc
281

382
Changes since version 1.39.0:
Collapse file

‎deps/uv/Makefile.am‎

Copy file name to clipboardExpand all lines: deps/uv/Makefile.am
+2-5Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ if WINNT
5656
uvinclude_HEADERS += include/uv/win.h include/uv/tree.h
5757
AM_CPPFLAGS += -I$(top_srcdir)/src/win \
5858
-DWIN32_LEAN_AND_MEAN \
59-
-D_WIN32_WINNT=0x0600
59+
-D_WIN32_WINNT=0x0602
6060
libuv_la_SOURCES += src/win/async.c \
6161
src/win/atomicops-inl.h \
6262
src/win/core.c \
@@ -225,6 +225,7 @@ test_run_tests_SOURCES = test/blackhole-server.c \
225225
test/test-poll-close.c \
226226
test/test-poll-close-doesnt-corrupt-stack.c \
227227
test/test-poll-closesocket.c \
228+
test/test-poll-multiple-handles.c \
228229
test/test-poll-oob.c \
229230
test/test-process-priority.c \
230231
test/test-process-title.c \
@@ -385,10 +386,6 @@ if ANDROID
385386
uvinclude_HEADERS += include/uv/android-ifaddrs.h
386387
libuv_la_CFLAGS += -D_GNU_SOURCE
387388
libuv_la_SOURCES += src/unix/android-ifaddrs.c \
388-
src/unix/linux-core.c \
389-
src/unix/linux-inotify.c \
390-
src/unix/linux-syscalls.c \
391-
src/unix/procfs-exepath.c \
392389
src/unix/pthread-fixes.c \
393390
src/unix/random-getrandom.c \
394391
src/unix/random-sysctl-linux.c
Collapse file

‎deps/uv/README.md‎

Copy file name to clipboardExpand all lines: deps/uv/README.md
+10Lines changed: 10 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,16 @@ listed in `test/benchmark-list.h`.
286286

287287
Check the [SUPPORTED_PLATFORMS file](SUPPORTED_PLATFORMS.md).
288288

289+
### `-fno-strict-aliasing`
290+
291+
It is recommended to turn on the `-fno-strict-aliasing` compiler flag in
292+
projects that use libuv. The use of ad hoc "inheritance" in the libuv API
293+
may not be safe in the presence of compiler optimizations that depend on
294+
strict aliasing.
295+
296+
MSVC does not have an equivalent flag but it also does not appear to need it
297+
at the time of writing (December 2019.)
298+
289299
### AIX Notes
290300

291301
AIX compilation using IBM XL C/C++ requires version 12.1 or greater.
Collapse file

‎deps/uv/SUPPORTED_PLATFORMS.md‎

Copy file name to clipboardExpand all lines: deps/uv/SUPPORTED_PLATFORMS.md
+2-2Lines changed: 2 additions & 2 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
|---|---|---|---|
55
| GNU/Linux | Tier 1 | Linux >= 2.6.32 with glibc >= 2.12 | |
66
| macOS | Tier 1 | macOS >= 10.7 | |
7-
| Windows | Tier 1 | >= Windows 7 | MSVC 2008 and later are supported |
7+
| Windows | Tier 1 | >= Windows 8 | VS 2015 and later are supported |
88
| FreeBSD | Tier 1 | >= 10 | |
99
| AIX | Tier 2 | >= 6 | Maintainers: @libuv/aix |
10+
| IBM i | Tier 2 | >= IBM i 7.2 | Maintainers: @libuv/ibmi |
1011
| z/OS | Tier 2 | >= V2R2 | Maintainers: @libuv/zos |
1112
| Linux with musl | Tier 2 | musl >= 1.0 | |
1213
| SmartOS | Tier 2 | >= 14.4 | Maintainers: @libuv/smartos |
1314
| Android | Tier 3 | NDK >= r15b | |
14-
| IBM i | Tier 3 | >= IBM i 7.2 | Maintainers: @libuv/ibmi |
1515
| MinGW | Tier 3 | MinGW32 and MinGW-w64 | |
1616
| SunOS | Tier 3 | Solaris 121 and later | |
1717
| Other | Tier 3 | N/A | |
Collapse file

‎deps/uv/configure.ac‎

Copy file name to clipboardExpand all lines: deps/uv/configure.ac
+2-1Lines changed: 2 additions & 1 deletion
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.40.0], [https://github.com/libuv/libuv/issues])
16+
AC_INIT([libuv], [1.41.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])
@@ -25,6 +25,7 @@ AC_ENABLE_STATIC
2525
AC_PROG_CC
2626
AM_PROG_CC_C_O
2727
CC_FLAG_VISIBILITY #[-fvisibility=hidden]
28+
CC_CHECK_CFLAGS_APPEND([-fno-strict-aliasing])
2829
CC_CHECK_CFLAGS_APPEND([-g])
2930
CC_CHECK_CFLAGS_APPEND([-std=gnu89])
3031
CC_CHECK_CFLAGS_APPEND([-Wall])
Collapse file

‎deps/uv/docs/src/pipe.rst‎

Copy file name to clipboardExpand all lines: deps/uv/docs/src/pipe.rst
+18Lines changed: 18 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -118,3 +118,21 @@ API
118118
function is blocking.
119119
120120
.. versionadded:: 1.16.0
121+
122+
.. c:function:: int uv_pipe(uv_file fds[2], int read_flags, int write_flags)
123+
124+
Create a pair of connected pipe handles.
125+
Data may be written to `fds[1]` and read from `fds[0]`.
126+
The resulting handles can be passed to `uv_pipe_open`, used with `uv_spawn`,
127+
or for any other purpose.
128+
129+
Valid values for `flags` are:
130+
131+
- UV_NONBLOCK_PIPE: Opens the specified socket handle for `OVERLAPPED`
132+
or `FIONBIO`/`O_NONBLOCK` I/O usage.
133+
This is recommended for handles that will be used by libuv,
134+
and not usually recommended otherwise.
135+
136+
Equivalent to :man:`pipe(2)` with the `O_CLOEXEC` flag set.
137+
138+
.. versionadded:: 1.41.0
Collapse file

‎deps/uv/docs/src/poll.rst‎

Copy file name to clipboardExpand all lines: deps/uv/docs/src/poll.rst
+44-17Lines changed: 44 additions & 17 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -86,36 +86,63 @@ API
8686
.. c:function:: int uv_poll_start(uv_poll_t* handle, int events, uv_poll_cb cb)
8787
8888
Starts polling the file descriptor. `events` is a bitmask made up of
89-
UV_READABLE, UV_WRITABLE, UV_PRIORITIZED and UV_DISCONNECT. As soon as an
90-
event is detected the callback will be called with `status` set to 0, and the
91-
detected events set on the `events` field.
89+
`UV_READABLE`, `UV_WRITABLE`, `UV_PRIORITIZED` and `UV_DISCONNECT`. As soon
90+
as an event is detected the callback will be called with `status` set to 0,
91+
and the detected events set on the `events` field.
9292
93-
The UV_PRIORITIZED event is used to watch for sysfs interrupts or TCP out-of-band
94-
messages.
93+
The `UV_PRIORITIZED` event is used to watch for sysfs interrupts or TCP
94+
out-of-band messages.
9595
96-
The UV_DISCONNECT event is optional in the sense that it may not be
97-
reported and the user is free to ignore it, but it can help optimize the shutdown
98-
path because an extra read or write call might be avoided.
96+
The `UV_DISCONNECT` event is optional in the sense that it may not be
97+
reported and the user is free to ignore it, but it can help optimize the
98+
shutdown path because an extra read or write call might be avoided.
9999
100100
If an error happens while polling, `status` will be < 0 and corresponds
101-
with one of the UV_E* error codes (see :ref:`errors`). The user should
101+
with one of the `UV_E*` error codes (see :ref:`errors`). The user should
102102
not close the socket while the handle is active. If the user does that
103-
anyway, the callback *may* be called reporting an error status, but this
104-
is **not** guaranteed.
103+
anyway, the callback *may* be called reporting an error status, but this is
104+
**not** guaranteed.
105105
106106
.. note::
107-
Calling :c:func:`uv_poll_start` on a handle that is already active is fine. Doing so
108-
will update the events mask that is being watched for.
107+
Calling :c:func:`uv_poll_start` on a handle that is already active is
108+
fine. Doing so will update the events mask that is being watched for.
109109
110110
.. note::
111-
Though UV_DISCONNECT can be set, it is unsupported on AIX and as such will not be set
112-
on the `events` field in the callback.
111+
Though `UV_DISCONNECT` can be set, it is unsupported on AIX and as such
112+
will not be set on the `events` field in the callback.
113113
114-
.. versionchanged:: 1.9.0 Added the UV_DISCONNECT event.
115-
.. versionchanged:: 1.14.0 Added the UV_PRIORITIZED event.
114+
.. note::
115+
If one of the events `UV_READABLE` or `UV_WRITABLE` are set, the
116+
callback will be called again, as long as the given fd/socket remains
117+
readable or writable accordingly. Particularly in each of the following
118+
scenarios:
119+
120+
* The callback has been called because the socket became
121+
readable/writable and the callback did not conduct a read/write on
122+
this socket at all.
123+
* The callback committed a read on the socket, and has not read all the
124+
available data (when `UV_READABLE` is set).
125+
* The callback committed a write on the socket, but it remained
126+
writable afterwards (when `UV_WRITABLE` is set).
127+
* The socket has already became readable/writable before calling
128+
:c:func:`uv_poll_start` on a poll handle associated with this socket,
129+
and since then the state of the socket did not changed.
130+
131+
In all of the above listed scenarios, the socket remains readable or
132+
writable and hence the callback will be called again (depending on the
133+
events set in the bitmask). This behaviour is known as level
134+
triggering.
135+
136+
.. versionchanged:: 1.9.0 Added the `UV_DISCONNECT` event.
137+
.. versionchanged:: 1.14.0 Added the `UV_PRIORITIZED` event.
116138
117139
.. c:function:: int uv_poll_stop(uv_poll_t* poll)
118140
119141
Stop polling the file descriptor, the callback will no longer be called.
120142
143+
.. note::
144+
Calling :c:func:`uv_poll_stop` is effective immediately: any pending
145+
callback is also canceled, even if the socket state change notification
146+
was already pending.
147+
121148
.. seealso:: The :c:type:`uv_handle_t` API functions also apply.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.