musl: update to 1.1.21.

To make sure that musl honours the elf stacksize header the shlib was
also bumped.
This commit is contained in:
Enno Boland 2019-01-22 13:29:22 +01:00 committed by Enno Boland
parent d3f97e4cb7
commit 0e39f18997
4 changed files with 4 additions and 110 deletions

View file

@ -16,7 +16,7 @@
# PLEASE NOTE: when multiple packages provide the same SONAME, the first
# one (order top->bottom) is preferred over the next ones.
#
libc.so musl-0.9.9_1
libc.so musl-1.1.21_1
libc.so.6 glibc-2.28_1
libm.so.6 glibc-2.28_1
libpthread.so.0 glibc-2.28_1

View file

@ -1,52 +0,0 @@
From f381c118b2d4f7d914481d3cdc830ce41369b002 Mon Sep 17 00:00:00 2001
From: Rich Felker <dalias@aerifal.cx>
Date: Wed, 19 Sep 2018 18:03:22 -0400
Subject: [PATCH] fix getaddrinfo regression with AI_ADDRCONFIG on some
configurations
despite not being documented to do so in the standard or Linux
documentation, attempts to udp connect to 127.0.0.1 or ::1 generate
EADDRNOTAVAIL when the loopback device is not configured and there is
no default route for IPv6. this caused getaddrinfo with AI_ADDRCONFIG
to fail with EAI_SYSTEM and EADDRNOTAVAIL on some no-IPv6
configurations, rather than the intended behavior of detecting IPv6 as
unsuppported and producing IPv4-only results.
previously, only EAFNOSUPPORT was treated as unavailability of the
address family being probed. instead, treat all errors related to
inability to get an address or route as conclusive that the family
being probed is unsupported, and only fail with EAI_SYSTEM on other
errors.
further improvements may be desirable, such as reporting EAI_AGAIN
instead of EAI_SYSTEM for errors which are expected to be transient,
but this patch should suffice to fix the serious regression.
---
src/network/getaddrinfo.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git src/network/getaddrinfo.c src/network/getaddrinfo.c
index ba26847a..e33bfa28 100644
--- src/network/getaddrinfo.c
+++ src/network/getaddrinfo.c
@@ -76,7 +76,16 @@ int getaddrinfo(const char *restrict host, const char *restrict serv, const stru
close(s);
if (!r) continue;
}
- if (errno != EAFNOSUPPORT) return EAI_SYSTEM;
+ switch (errno) {
+ case EADDRNOTAVAIL:
+ case EAFNOSUPPORT:
+ case EHOSTUNREACH:
+ case ENETDOWN:
+ case ENETUNREACH:
+ break;
+ default:
+ return EAI_SYSTEM;
+ }
if (family == tf[i]) return EAI_NONAME;
family = tf[1-i];
}
--
2.18.0

View file

@ -1,54 +0,0 @@
From 0db393d3a77bb9f300a356c6a5484fc2dddb161d Mon Sep 17 00:00:00 2001
From: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>
Date: Tue, 18 Sep 2018 10:03:27 +0300
Subject: fix race condition in file locking
The condition occurs when
- thread #1 is holding the lock
- thread #2 is waiting for it on __futexwait
- thread #1 is about to release the lock and performs a_swap
- thread #3 enters the __lockfile function and manages to grab the lock
before thread #1 calls __wake, resetting the MAYBE_WAITERS flag
- thread #1 calls __wake
- thread #2 wakes up but goes again to __futexwait as the lock is
held by thread #3
- thread #3 releases the lock but does not call __wake as the
MAYBE_WAITERS flag is not set
This condition results in thread #2 not being woken up. This patch fixes
the problem by making the woken up thread ensure that the flag is
properly set before going to sleep again.
Mainainer's note: This fixes a regression introduced in commit
c21f750727515602a9e84f2a190ee8a0a2aeb2a1.
---
src/stdio/__lockfile.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git src/stdio/__lockfile.c.orig src/stdio/__lockfile.c
index 2ff75d8a..0dcb2a42 100644
--- src/stdio/__lockfile.c.orig
+++ src/stdio/__lockfile.c
@@ -8,13 +8,13 @@ int __lockfile(FILE *f)
int owner = f->lock, tid = __pthread_self()->tid;
if ((owner & ~MAYBE_WAITERS) == tid)
return 0;
- for (;;) {
- owner = a_cas(&f->lock, 0, tid);
- if (!owner) return 1;
- if (a_cas(&f->lock, owner, owner|MAYBE_WAITERS)==owner) break;
+ owner = a_cas(&f->lock, 0, tid);
+ if (!owner) return 1;
+ while ((owner = a_cas(&f->lock, 0, tid|MAYBE_WAITERS))) {
+ if ((owner & MAYBE_WAITERS) ||
+ a_cas(&f->lock, owner, owner|MAYBE_WAITERS)==owner)
+ __futexwait(&f->lock, owner|MAYBE_WAITERS, 1);
}
- while ((owner = a_cas(&f->lock, 0, tid|MAYBE_WAITERS)))
- __futexwait(&f->lock, owner, 1);
return 1;
}
--
cgit v1.2.1

View file

@ -1,7 +1,7 @@
# Template file for 'musl'.
pkgname=musl
version=1.1.20
revision=2
version=1.1.21
revision=1
build_style=gnu-configure
configure_args="--prefix=/usr --disable-gcc-wrapper"
conflicts="glibc>=0"
@ -11,7 +11,7 @@ maintainer="Juan RP <xtraeme@voidlinux.org>"
license="MIT"
homepage="http://www.musl-libc.org/"
distfiles="http://www.musl-libc.org/releases/musl-${version}.tar.gz"
checksum=44be8771d0e6c6b5f82dd15662eb2957c9a3173a19a8b49966ac0542bbd40d61
checksum=c742b66f6f49c9e5f52f64d8b79fecb5a0f6e0203fca176c70ca20f6be285f44
nostrip_files="libc.so"
shlib_provides="libc.so"