Update to 1.29.0

Drop upstreamed patch

Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
This commit is contained in:
Stephen Gallagher 2019-05-15 19:56:35 -04:00
parent 3ac5933d5f
commit 5726874a1f
No known key found for this signature in database
GPG Key ID: 7A25556236BAA3A3
4 changed files with 8 additions and 120 deletions

1
.gitignore vendored
View File

@ -55,3 +55,4 @@
/libuv-v1.26.0.tar.gz
/libuv-v1.27.0.tar.gz
/libuv-v1.28.0.tar.gz
/libuv-v1.29.0.tar.gz

View File

@ -1,114 +0,0 @@
From 7a35cbab6847a9fd7decc3c47dcccdc22ef59408 Mon Sep 17 00:00:00 2001
From: Anna Henningsen <anna@addaleax.net>
Date: Fri, 3 May 2019 18:33:13 +0200
Subject: [PATCH] unix,win: fix `uv_fs_poll_stop()` when active
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Fix `uv_fs_poll_stop()` for active handles by not attempting to
mark the `uv_fs_poll_t` handle as closing when `uv_close()`
hasnt been called on it.
Fixes: https://github.com/libuv/libuv/issues/2287
Refs: https://github.com/libuv/libuv/pull/1875
---
src/fs-poll.c | 2 +-
test/test-fs-poll.c | 39 +++++++++++++++++++++++++++++++++++++++
test/test-list.h | 2 ++
3 files changed, 42 insertions(+), 1 deletion(-)
diff --git a/src/fs-poll.c b/src/fs-poll.c
index 40cb147e8d..89864e23fb 100644
--- a/src/fs-poll.c
+++ b/src/fs-poll.c
@@ -241,7 +241,7 @@ static void timer_close_cb(uv_handle_t* timer) {
handle = ctx->parent_handle;
if (ctx == handle->poll_ctx) {
handle->poll_ctx = ctx->previous;
- if (handle->poll_ctx == NULL)
+ if (handle->poll_ctx == NULL && uv__is_closing(handle))
uv__make_close_pending((uv_handle_t*)handle);
} else {
for (last = handle->poll_ctx, it = last->previous;
diff --git a/test/test-fs-poll.c b/test/test-fs-poll.c
index e19a68780f..9dfd5fdd6a 100644
--- a/test/test-fs-poll.c
+++ b/test/test-fs-poll.c
@@ -37,6 +37,10 @@ static void poll_cb_fail(uv_fs_poll_t* handle,
int status,
const uv_stat_t* prev,
const uv_stat_t* curr);
+static void poll_cb_noop(uv_fs_poll_t* handle,
+ int status,
+ const uv_stat_t* prev,
+ const uv_stat_t* curr);
static uv_fs_poll_t poll_handle;
static uv_timer_t timer_handle;
@@ -84,6 +88,12 @@ static void poll_cb_fail(uv_fs_poll_t* handle,
ASSERT(0 && "fail_cb called");
}
+static void poll_cb_noop(uv_fs_poll_t* handle,
+ int status,
+ const uv_stat_t* prev,
+ const uv_stat_t* curr) {
+}
+
static void poll_cb(uv_fs_poll_t* handle,
int status,
@@ -259,3 +269,32 @@ TEST_IMPL(fs_poll_close_request_multi_stop_start) {
MAKE_VALGRIND_HAPPY();
return 0;
}
+
+TEST_IMPL(fs_poll_close_request_stop_when_active) {
+ /* Regression test for https://github.com/libuv/libuv/issues/2287. */
+ uv_loop_t loop;
+ uv_fs_poll_t poll_handle;
+
+ remove(FIXTURE);
+
+ ASSERT(0 == uv_loop_init(&loop));
+
+ /* Set up all handles. */
+ ASSERT(0 == uv_fs_poll_init(&loop, &poll_handle));
+ ASSERT(0 == uv_fs_poll_start(&poll_handle, poll_cb_noop, FIXTURE, 100));
+ uv_run(&loop, UV_RUN_ONCE);
+
+ /* Close the timer handle, and do not crash. */
+ ASSERT(0 == uv_fs_poll_stop(&poll_handle));
+ uv_run(&loop, UV_RUN_ONCE);
+
+ /* Clean up after the test. */
+ uv_close((uv_handle_t*) &poll_handle, close_cb);
+ uv_run(&loop, UV_RUN_ONCE);
+ ASSERT(close_cb_called == 1);
+
+ ASSERT(0 == uv_loop_close(&loop));
+
+ MAKE_VALGRIND_HAPPY();
+ return 0;
+}
diff --git a/test/test-list.h b/test/test-list.h
index cf5420adfb..c090854bc5 100644
--- a/test/test-list.h
+++ b/test/test-list.h
@@ -290,6 +290,7 @@ TEST_DECLARE (fs_poll_getpath)
TEST_DECLARE (fs_poll_close_request)
TEST_DECLARE (fs_poll_close_request_multi_start_stop)
TEST_DECLARE (fs_poll_close_request_multi_stop_start)
+TEST_DECLARE (fs_poll_close_request_stop_when_active)
TEST_DECLARE (kill)
TEST_DECLARE (kill_invalid_signum)
TEST_DECLARE (fs_file_noent)
@@ -844,6 +845,7 @@ TASK_LIST_START
TEST_ENTRY (fs_poll_close_request)
TEST_ENTRY (fs_poll_close_request_multi_start_stop)
TEST_ENTRY (fs_poll_close_request_multi_stop_start)
+ TEST_ENTRY (fs_poll_close_request_stop_when_active)
TEST_ENTRY (kill)
TEST_ENTRY (kill_invalid_signum)

View File

@ -1,7 +1,7 @@
Name: libuv
Epoch: 1
Version: 1.28.0
Release: 2%{?dist}
Version: 1.29.0
Release: 1%{?dist}
Summary: Platform layer for node.js
# the licensing breakdown is described in detail in the LICENSE file
@ -13,9 +13,6 @@ Source2: %{name}.pc.in
BuildRequires: autoconf automake libtool
BuildRequires: gcc
# Upstream patch for BZ#1703935
Patch0001: 2288.patch
%description
libuv is a new platform layer for Node. Its purpose is to abstract IOCP on
Windows and libev on Unix systems. We intend to eventually contain all platform
@ -71,6 +68,10 @@ rm -f %{buildroot}%{_libdir}/libuv.la
%{_libdir}/%{name}.a
%changelog
* Wed May 15 2019 Stephen Gallagher <sgallagh@redhat.com> - 1.29.0-1
- Update to 1.29.0
- Drop upstreamed patch
* Fri May 03 2019 Stephen Gallagher <sgallagh@redhat.com> - 1.28.0-2
- Fix regression in uv_fs_poll_stop() (BZ 1703935)

View File

@ -1 +1 @@
SHA512 (libuv-v1.28.0.tar.gz) = d7f635ab99569e96db9ae97d29a302f5eec1fd75c71b035ec597a6b978a3fc797a37c7406fed81a27d4d706fe21cbfe919d829d6dae67399cd5cddd107ad6949
SHA512 (libuv-v1.29.0.tar.gz) = 52b22574842d8f3f98f796ecb5b909acca2ab4200a54129644f0994978ce19ec3e36d785bc1bc30096ad14e54564321cb1f57df43f6a36b3267fda44fc2a7ae7