Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deps: upgrade libuv to 1.7.5 #3010

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions deps/uv/AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -224,3 +224,4 @@ Jianghua Yang <[email protected]>
Colin Snover <[email protected]>
Sakthipriyan Vairamani <[email protected]>
Eli Skeggs <[email protected]>
nmushell <[email protected]>
21 changes: 21 additions & 0 deletions deps/uv/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
2015.09.23, Version 1.7.5 (Stable), a8c1136de2cabf25b143021488cbaab05834daa8

Changes since version 1.7.4:

* unix: Support atomic compare & swap xlC on AIX (nmushell)

* unix: Fix including uv-aix.h on AIX (nmushell)

* unix: consolidate rwlock tryrdlock trywrlock errors (Saúl Ibarra Corretgé)

* unix, win: consolidate mutex trylock errors (Saúl Ibarra Corretgé)

* darwin: fix memory leak in uv_cpu_info (Jianghua Yang)

* test: add tests for the uv_rwlock implementation (Bert Belder)

* win: redo/fix the uv_rwlock APIs (Bert Belder)

* win: don't fetch function pointers to SRWLock APIs (Bert Belder)


2015.09.12, Version 1.7.4 (Stable), a7ad4f52189d89cfcba35f78bfc5ff3b1f4105c4

Changes since version 1.7.3:
Expand Down
1 change: 1 addition & 0 deletions deps/uv/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,7 @@ endif

if AIX
libuv_la_CFLAGS += -D_ALL_SOURCE -D_XOPEN_SOURCE=500 -D_LINUX_SOURCE_COMPAT
include_HEADERS += include/uv-aix.h
libuv_la_SOURCES += src/unix/aix.c
endif

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.4.build{build}
version: v1.7.5.build{build}

install:
- cinst -y nsis
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.4], [https://github.com/libuv/libuv/issues])
AC_INIT([libuv], [1.7.5], [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
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 7
#define UV_VERSION_PATCH 4
#define UV_VERSION_PATCH 5
#define UV_VERSION_IS_RELEASE 1
#define UV_VERSION_SUFFIX ""

Expand Down
26 changes: 12 additions & 14 deletions deps/uv/include/uv-win.h
Original file line number Diff line number Diff line change
Expand Up @@ -246,22 +246,20 @@ typedef union {
} uv_cond_t;

typedef union {
/* srwlock_ has type SRWLOCK, but not all toolchains define this type in */
/* windows.h. */
SRWLOCK srwlock_;
struct {
union {
CRITICAL_SECTION cs;
/* TODO: remove me in v2.x. */
uv_mutex_t unused;
} read_lock_;
union {
HANDLE sem;
/* TODO: remove me in v2.x. */
uv_mutex_t unused;
} write_lock_;
unsigned int num_readers_;
} fallback_;
CRITICAL_SECTION num_readers_lock_;
HANDLE write_semaphore_;
} state_;
/* TODO: remove me in v2.x. */
struct {
SRWLOCK unused_;
} unused1_;
/* TODO: remove me in v2.x. */
struct {
uv_mutex_t unused1_;
uv_mutex_t unused2_;
} unused2_;
} uv_rwlock_t;

typedef struct {
Expand Down
12 changes: 12 additions & 0 deletions deps/uv/src/unix/atomic-ops.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ UV_UNUSED(static int cmpxchgi(int* ptr, int oldval, int newval)) {
: "r" (newval), "0" (oldval)
: "memory");
return out;
#elif defined(_AIX) && defined(__xlC__)
const int out = (*(volatile int*) ptr);
__compare_and_swap(ptr, &oldval, newval);
return out;
#else
return __sync_val_compare_and_swap(ptr, oldval, newval);
#endif
Expand All @@ -46,6 +50,14 @@ UV_UNUSED(static long cmpxchgl(long* ptr, long oldval, long newval)) {
: "r" (newval), "0" (oldval)
: "memory");
return out;
#elif defined(_AIX) && defined(__xlC__)
const long out = (*(volatile int*) ptr);
# if defined(__64BIT__)
__compare_and_swaplp(ptr, &oldval, newval);
# else
__compare_and_swap(ptr, &oldval, newval);
# endif /* if defined(__64BIT__) */
return out;
#else
return __sync_val_compare_and_swap(ptr, oldval, newval);
#endif
Expand Down
6 changes: 4 additions & 2 deletions deps/uv/src/unix/darwin.c
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,10 @@ int uv_cpu_info(uv_cpu_info_t** cpu_infos, int* count) {
}

*cpu_infos = uv__malloc(numcpus * sizeof(**cpu_infos));
if (!(*cpu_infos))
return -ENOMEM; /* FIXME(bnoordhuis) Deallocate info? */
if (!(*cpu_infos)) {
vm_deallocate(mach_task_self(), (vm_address_t)info, msg_type);
return -ENOMEM;
}

*count = numcpus;

Expand Down
30 changes: 18 additions & 12 deletions deps/uv/src/unix/thread.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,14 +124,14 @@ void uv_mutex_lock(uv_mutex_t* mutex) {
int uv_mutex_trylock(uv_mutex_t* mutex) {
int err;

/* FIXME(bnoordhuis) EAGAIN means recursive lock limit reached. Arguably
* a bug, should probably abort rather than return -EAGAIN.
*/
err = pthread_mutex_trylock(mutex);
if (err && err != EBUSY && err != EAGAIN)
abort();
if (err) {
if (err != EBUSY && err != EAGAIN)
abort();
return -EBUSY;
}

return -err;
return 0;
}


Expand Down Expand Up @@ -162,10 +162,13 @@ int uv_rwlock_tryrdlock(uv_rwlock_t* rwlock) {
int err;

err = pthread_rwlock_tryrdlock(rwlock);
if (err && err != EBUSY && err != EAGAIN)
abort();
if (err) {
if (err != EBUSY && err != EAGAIN)
abort();
return -EBUSY;
}

return -err;
return 0;
}


Expand All @@ -185,10 +188,13 @@ int uv_rwlock_trywrlock(uv_rwlock_t* rwlock) {
int err;

err = pthread_rwlock_trywrlock(rwlock);
if (err && err != EBUSY && err != EAGAIN)
abort();
if (err) {
if (err != EBUSY && err != EAGAIN)
abort();
return -EBUSY;
}

return -err;
return 0;
}


Expand Down
Loading