Skip to content

Commit

Permalink
deps: upgrade to libuv 1.23.1
Browse files Browse the repository at this point in the history
Backport-PR-URL: #24103
PR-URL: #22997
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
  • Loading branch information
cjihrig authored and MylesBorins committed Nov 11, 2018
1 parent d9d541c commit b38190e
Show file tree
Hide file tree
Showing 43 changed files with 587 additions and 366 deletions.
5 changes: 5 additions & 0 deletions deps/uv/AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -346,3 +346,8 @@ Paolo Greppi <paolo.greppi@libpf.com>
Shelley Vohr <shelley.vohr@gmail.com>
Ujjwal Sharma <usharma1998@gmail.com>
Michał Kozakiewicz <michalkozakiewicz3@gmail.com>
Emil Bay <github@tixz.dk>
Jeremiah Senkpiel <fishrock123@rocketmail.com>
Andy Zhang <zhangyong232@gmail.com>
dmabupt <dmabupt@gmail.com>
Ryan Liptak <squeek502@hotmail.com>
46 changes: 46 additions & 0 deletions deps/uv/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,49 @@
2018.09.22, Version 1.23.1 (Stable), d2282b3d67821dc53c907c2155fa8c5c6ce25180

Changes since version 1.23.0:

* unix,win: limit concurrent DNS calls to nthreads/2 (Anna Henningsen)

* doc: add addaleax to maintainers (Anna Henningsen)

* doc: add missing slash in stream.rst (Emil Bay)

* unix,fs: use utimes & friends for uv_fs_utime (Jeremiah Senkpiel)

* unix,fs: remove linux fallback from utimesat() (Jeremiah Senkpiel)

* unix,fs: remove uv__utimesat() syscall fallback (Jeremiah Senkpiel)

* doc: fix argument name in tcp.rts (Emil Bay)

* doc: notes on running tests, benchmarks, tools (Jamie Davis)

* linux: remove epoll syscall wrappers (Ben Noordhuis)

* linux: drop code path for epoll_pwait-less kernels (Ben Noordhuis)

* Partially revert "win,code: remove GetQueuedCompletionStatus-based poller"
(Jameson Nash)

* build: add compile for android arm64/x86/x86-64 (Andy Zhang)

* doc: clarify that some remarks apply to windows (Bert Belder)

* test: fix compiler warnings (Jamie Davis)

* ibmi: return 0 from uv_resident_set_memory() (dmabupt)

* win: fix uv_udp_recv_start() error translation (Ryan Liptak)

* win,doc: improve uv_os_setpriority() documentation (Bartosz Sosnowski)

* test: increase upper bound in condvar_5 (Jamie Davis)

* win,tty: remove deadcode (Jameson Nash)

* stream: autodetect direction (Jameson Nash)


2018.08.18, Version 1.23.0 (Stable), 7ebb26225f2eaae6db22f4ef34ce76fa16ff89ec

Changes since version 1.22.0:
Expand Down
1 change: 1 addition & 0 deletions deps/uv/MAINTAINERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

libuv is currently managed by the following individuals:

* **Anna Henningsen** ([@addaleax](https://github.com/addaleax))
* **Bartosz Sosnowski** ([@bzoz](https://github.com/bzoz))
* **Ben Noordhuis** ([@bnoordhuis](https://github.com/bnoordhuis))
- GPG key: D77B 1E34 243F BAF0 5F8E 9CC3 4F55 C8C8 46AB 89B9 (pubkey-bnoordhuis)
Expand Down
79 changes: 77 additions & 2 deletions deps/uv/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -282,8 +282,31 @@ Make sure that you specify the architecture you wish to build for in the

Run:

For arm

```bash
$ source ./android-configure-arm NDK_PATH gyp [API_LEVEL]
$ make -C out
```

or for arm64

```bash
$ source ./android-configure-arm64 NDK_PATH gyp [API_LEVEL]
$ make -C out
```

or for x86

```bash
$ source ./android-configure-x86 NDK_PATH gyp [API_LEVEL]
$ make -C out
```

or for x86_64

```bash
$ source ./android-configure NDK_PATH gyp [API_LEVEL]
$ source ./android-configure-x86_64 NDK_PATH gyp [API_LEVEL]
$ make -C out
```

Expand All @@ -310,14 +333,66 @@ $ ninja -C out/Release

### Running tests

Run:
#### Build

Build (includes tests):

```bash
$ ./gyp_uv.py -f make
$ make -C out
```

#### Run all tests

```bash
$ ./out/Debug/run-tests
```

#### Run one test

The list of all tests is in `test/test-list.h`.

This invocation will cause the `run-tests` driver to fork and execute `TEST_NAME` in a child process:

```bash
$ ./out/Debug/run-tests TEST_NAME
```

This invocation will cause the `run-tests` driver to execute the test within the `run-tests` process:

```bash
$ ./out/Debug/run-tests TEST_NAME TEST_NAME
```

#### Debugging tools

When running the test from within the `run-tests` process (`run-tests TEST_NAME TEST_NAME`), tools like gdb and valgrind work normally.
When running the test from a child of the `run-tests` process (`run-tests TEST_NAME`), use these tools in a fork-aware manner.

##### Fork-aware gdb

Use the [follow-fork-mode](https://sourceware.org/gdb/onlinedocs/gdb/Forks.html) setting:

```
$ gdb --args out/Debug/run-tests TEST_NAME
(gdb) set follow-fork-mode child
...
```

##### Fork-aware valgrind

Use the `--trace-children=yes` parameter:

```bash
$ valgrind --trace-children=yes -v --tool=memcheck --leak-check=full --track-origins=yes --leak-resolution=high --show-reachable=yes --log-file=memcheck.log out/Debug/run-tests TEST_NAME
```

### Running benchmarks

See the section on running tests.
The benchmark driver is `out/Debug/run-benchmarks` and the benchmarks are listed in `test/benchmark-list.h`.

## Supported Platforms

Check the [SUPPORTED_PLATFORMS file](SUPPORTED_PLATFORMS.md).
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

export TOOLCHAIN=$PWD/android-toolchain
export TOOLCHAIN=$PWD/android-toolchain-arm
mkdir -p $TOOLCHAIN
API=${3:-24}
$1/build/tools/make-standalone-toolchain.sh \
Expand Down
23 changes: 23 additions & 0 deletions deps/uv/android-configure-arm64
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash

export TOOLCHAIN=$PWD/android-toolchain-arm64
mkdir -p $TOOLCHAIN
API=${3:-24}
$1/build/tools/make-standalone-toolchain.sh \
--toolchain=aarch64-linux-android-4.9 \
--arch=arm64 \
--install-dir=$TOOLCHAIN \
--platform=android-$API \
--force
export PATH=$TOOLCHAIN/bin:$PATH
export AR=aarch64-linux-android-ar
export CC=aarch64-linux-android-gcc
export CXX=aarch64-linux-android-g++
export LINK=aarch64-linux-android-g++
export PLATFORM=android
export CFLAGS="-D__ANDROID_API__=$API"

if [[ $2 == 'gyp' ]]
then
./gyp_uv.py -Dtarget_arch=arm64 -DOS=android -f make-android
fi
23 changes: 23 additions & 0 deletions deps/uv/android-configure-x86
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash

export TOOLCHAIN=$PWD/android-toolchain-x86
mkdir -p $TOOLCHAIN
API=${3:-24}
$1/build/tools/make-standalone-toolchain.sh \
--toolchain=x86-4.9 \
--arch=x86 \
--install-dir=$TOOLCHAIN \
--platform=android-$API \
--force
export PATH=$TOOLCHAIN/bin:$PATH
export AR=i686-linux-android-ar
export CC=i686-linux-android-gcc
export CXX=i686-linux-android-g++
export LINK=i686-linux-android-g++
export PLATFORM=android
export CFLAGS="-D__ANDROID_API__=$API"

if [[ $2 == 'gyp' ]]
then
./gyp_uv.py -Dtarget_arch=x86 -DOS=android -f make-android
fi
25 changes: 25 additions & 0 deletions deps/uv/android-configure-x86_64
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash

export TOOLCHAIN=$PWD/android-toolchain-x86_64
mkdir -p $TOOLCHAIN
API=${3:-24}
$1/build/tools/make-standalone-toolchain.sh \
--toolchain=x86_64-4.9 \
--arch=x86_64 \
--install-dir=$TOOLCHAIN \
--platform=android-$API \
--force
export PATH=$TOOLCHAIN/bin:$PATH
export AR=x86_64-linux-android-ar
export CC=x86_64-linux-android-gcc
export CXX=x86_64-linux-android-g++
export LINK=x86_64-linux-android-g++
export PLATFORM=android
export CFLAGS="-D__ANDROID_API__=$API -fPIC"
export CXXFLAGS="-D__ANDROID_API__=$API -fPIC"
export LDFLAGS="-fPIC"

if [[ $2 == 'gyp' ]]
then
./gyp_uv.py -Dtarget_arch=x86_64 -DOS=android -f make-android
fi
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.23.0], [https://github.com/libuv/libuv/issues])
AC_INIT([libuv], [1.23.1], [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
4 changes: 4 additions & 0 deletions deps/uv/docs/src/misc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -544,4 +544,8 @@ API
process priority, the result will equal one of the `UV_PRIORITY`
constants, and not necessarily the exact value of `priority`.
.. note::
On Windows, setting `PRIORITY_HIGHEST` will only work for elevated user,
for others it will be silently reduced to `PRIORITY_HIGH`.
.. versionadded:: 1.23.0
10 changes: 5 additions & 5 deletions deps/uv/docs/src/signal.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ Reception of some signals is emulated on Windows:
program is given approximately 10 seconds to perform cleanup. After that
Windows will unconditionally terminate it.

Watchers for other signals can be successfully created, but these signals
are never received. These signals are: `SIGILL`, `SIGABRT`, `SIGFPE`, `SIGSEGV`,
`SIGTERM` and `SIGKILL.`
* Watchers for other signals can be successfully created, but these signals
are never received. These signals are: `SIGILL`, `SIGABRT`, `SIGFPE`, `SIGSEGV`,
`SIGTERM` and `SIGKILL.`

Calls to raise() or abort() to programmatically raise a signal are
not detected by libuv; these will not trigger a signal watcher.
* Calls to raise() or abort() to programmatically raise a signal are
not detected by libuv; these will not trigger a signal watcher.

.. note::
On Linux SIGRT0 and SIGRT1 (signals 32 and 33) are used by the NPTL pthreads library to
Expand Down
2 changes: 1 addition & 1 deletion deps/uv/docs/src/stream.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Data types
`nread` might be 0, which does *not* indicate an error or EOF. This
is equivalent to ``EAGAIN`` or ``EWOULDBLOCK`` under ``read(2)``.

The callee is responsible for stopping closing the stream when an error happens
The callee is responsible for stopping/closing the stream when an error happens
by calling :c:func:`uv_read_stop` or :c:func:`uv_close`. Trying to read
from the stream again is undefined.

Expand Down
4 changes: 2 additions & 2 deletions deps/uv/docs/src/tcp.rst
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,13 @@ API
.. c:function:: int uv_tcp_getsockname(const uv_tcp_t* handle, struct sockaddr* name, int* namelen)
Get the current address to which the handle is bound. `addr` must point to
Get the current address to which the handle is bound. `name` must point to
a valid and big enough chunk of memory, ``struct sockaddr_storage`` is
recommended for IPv4 and IPv6 support.
.. c:function:: int uv_tcp_getpeername(const uv_tcp_t* handle, struct sockaddr* name, int* namelen)
Get the address of the peer connected to the handle. `addr` must point to
Get the address of the peer connected to the handle. `name` must point to
a valid and big enough chunk of memory, ``struct sockaddr_storage`` is
recommended for IPv4 and IPv6 support.
Expand Down
11 changes: 5 additions & 6 deletions deps/uv/docs/src/tty.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ N/A
API
---

.. c:function:: int uv_tty_init(uv_loop_t* loop, uv_tty_t* handle, uv_file fd, int readable)
.. c:function:: int uv_tty_init(uv_loop_t* loop, uv_tty_t* handle, uv_file fd, int unused)
Initialize a new TTY stream with the given file descriptor. Usually the
file descriptor will be:
Expand All @@ -55,9 +55,6 @@ API
* 1 = stdout
* 2 = stderr
`readable`, specifies if you plan on calling :c:func:`uv_read_start` with
this stream. stdin is readable, stdout is not.
On Unix this function will determine the path of the fd of the terminal
using :man:`ttyname_r(3)`, open it, and use it if the passed file descriptor
refers to a TTY. This lets libuv put the tty in non-blocking mode without
Expand All @@ -67,8 +64,10 @@ API
ioctl TIOCGPTN or TIOCPTYGNAME, for instance OpenBSD and Solaris.
.. note::
If reopening the TTY fails, libuv falls back to blocking writes for
non-readable TTY streams.
If reopening the TTY fails, libuv falls back to blocking writes.
.. versionchanged:: 1.23.1: the `readable` parameter is now unused and ignored.
The correct value will now be auto-detected from the kernel.
.. versionchanged:: 1.9.0: the path of the TTY is determined by
:man:`ttyname_r(3)`. In earlier versions libuv opened
Expand Down
2 changes: 1 addition & 1 deletion deps/uv/include/uv/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

#define UV_VERSION_MAJOR 1
#define UV_VERSION_MINOR 23
#define UV_VERSION_PATCH 0
#define UV_VERSION_PATCH 1
#define UV_VERSION_IS_RELEASE 1
#define UV_VERSION_SUFFIX ""

Expand Down
Loading

0 comments on commit b38190e

Please sign in to comment.