aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--main/musl/0001-check-result-from-res_mkquery.patch33
-rw-r--r--main/musl/0001-handle-non-matching-address-family-entries-in-hosts-.patch62
-rw-r--r--main/musl/0002-fix-at-the-start-of-a-BRE-subexpression.patch39
-rw-r--r--main/musl/0003-fix-at-the-start-of-a-complete-BRE.patch34
-rw-r--r--main/musl/0004-math-fix-expf-NAN-and-exp2f-NAN-to-return-NAN-instea.patch43
-rw-r--r--main/musl/0005-env-avoid-leaving-dangling-pointers-in-__env_map.patch27
-rw-r--r--main/musl/0006-fix-padding-string-formats-to-width-in-wide-printf-v.patch49
-rw-r--r--main/musl/0007-fix-gethostbyaddr_r-to-fill-struct-hostent.h_length-.patch25
-rw-r--r--main/musl/0008-fix-undefined-pointer-comparison-in-stdio-internal-_.patch36
-rw-r--r--main/musl/0009-fix-regression-disabling-use-of-pause-instruction-fo.patch62
-rw-r--r--main/musl/0010-fix-read-past-end-of-haystack-buffer-for-short-needl.patch36
-rw-r--r--main/musl/0011-fix-FILE-buffer-underflow-in-ungetwc.patch54
-rw-r--r--main/musl/0012-fix-incorrect-protocol-name-and-number-for-egp.patch28
-rw-r--r--main/musl/APKBUILD67
-rw-r--r--main/musl/fix-failure-to-obtain-EOWNERDEAD-status-for-process-shared-robust-mutexes.patch69
15 files changed, 6 insertions, 658 deletions
diff --git a/main/musl/0001-check-result-from-res_mkquery.patch b/main/musl/0001-check-result-from-res_mkquery.patch
deleted file mode 100644
index 384617a9fa..0000000000
--- a/main/musl/0001-check-result-from-res_mkquery.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 9ba48c2e4f1a8a0670ffc40c02ac6a909c62668e Mon Sep 17 00:00:00 2001
-From: Natanael Copa <ncopa@alpinelinux.org>
-Date: Wed, 25 May 2016 09:37:54 +0200
-Subject: [PATCH] check result from res_mkquery
-
-we don't want to try send a query that may be malformatted.
----
- src/network/lookup_name.c | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/src/network/lookup_name.c b/src/network/lookup_name.c
-index 86f90ac..d3d97b4 100644
---- a/src/network/lookup_name.c
-+++ b/src/network/lookup_name.c
-@@ -145,11 +145,15 @@ static int name_from_dns(struct address buf[static MAXADDRS], char canon[static
- if (family != AF_INET6) {
- qlens[nq] = __res_mkquery(0, name, 1, RR_A, 0, 0, 0,
- qbuf[nq], sizeof *qbuf);
-+ if (qlens[nq] == -1)
-+ return EAI_NONAME;
- nq++;
- }
- if (family != AF_INET) {
- qlens[nq] = __res_mkquery(0, name, 1, RR_AAAA, 0, 0, 0,
- qbuf[nq], sizeof *qbuf);
-+ if (qlens[nq] == -1)
-+ return EAI_NONAME;
- nq++;
- }
-
---
-2.8.4
-
diff --git a/main/musl/0001-handle-non-matching-address-family-entries-in-hosts-.patch b/main/musl/0001-handle-non-matching-address-family-entries-in-hosts-.patch
deleted file mode 100644
index 927106d574..0000000000
--- a/main/musl/0001-handle-non-matching-address-family-entries-in-hosts-.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-From 6d70c08a2c37745df637b231711f6dec79dbc6e1 Mon Sep 17 00:00:00 2001
-From: Rich Felker <dalias@aerifal.cx>
-Date: Wed, 2 Mar 2016 00:34:51 -0500
-Subject: [PATCH] handle non-matching address family entries in hosts file
-
-name_from_hosts failed to account for the possibility of an address
-family error from name_from_numeric, wrongly counting such a return as
-success and using the uninitialized address data as part of the
-results passed up to the caller.
-
-non-matching address family entries cannot simply be ignored or
-results would be inconsistent with respect to whether AF_UNSPEC or a
-specific address family is queried. instead, record that a
-non-matching entry was seen, and fail the lookup with EAI_NONAME of no
-matching-family entries are found.
----
- src/network/lookup_name.c | 14 +++++++++++---
- 1 file changed, 11 insertions(+), 3 deletions(-)
-
-diff --git a/src/network/lookup_name.c b/src/network/lookup_name.c
-index a26ad53..86f90ac 100644
---- a/src/network/lookup_name.c
-+++ b/src/network/lookup_name.c
-@@ -49,7 +49,7 @@ static int name_from_hosts(struct address buf[static MAXADDRS], char canon[stati
- {
- char line[512];
- size_t l = strlen(name);
-- int cnt = 0;
-+ int cnt = 0, badfam = 0;
- unsigned char _buf[1032];
- FILE _f, *f = __fopen_rb_ca("/etc/hosts", &_f, _buf, sizeof _buf);
- if (!f) switch (errno) {
-@@ -71,8 +71,16 @@ static int name_from_hosts(struct address buf[static MAXADDRS], char canon[stati
- /* Isolate IP address to parse */
- for (p=line; *p && !isspace(*p); p++);
- *p++ = 0;
-- if (name_from_numeric(buf+cnt, line, family))
-+ switch (name_from_numeric(buf+cnt, line, family)) {
-+ case 1:
- cnt++;
-+ break;
-+ case 0:
-+ continue;
-+ default:
-+ badfam = EAI_NONAME;
-+ continue;
-+ }
-
- /* Extract first name as canonical name */
- for (; *p && isspace(*p); p++);
-@@ -81,7 +89,7 @@ static int name_from_hosts(struct address buf[static MAXADDRS], char canon[stati
- if (is_valid_hostname(p)) memcpy(canon, p, z-p+1);
- }
- __fclose_ca(f);
-- return cnt;
-+ return cnt ? cnt : badfam;
- }
-
- struct dpc_ctx {
---
-2.7.2
-
diff --git a/main/musl/0002-fix-at-the-start-of-a-BRE-subexpression.patch b/main/musl/0002-fix-at-the-start-of-a-BRE-subexpression.patch
deleted file mode 100644
index 7c5c82516f..0000000000
--- a/main/musl/0002-fix-at-the-start-of-a-BRE-subexpression.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From 39ea71fb8afddda879a1999f2a203dfdaf57a639 Mon Sep 17 00:00:00 2001
-From: Szabolcs Nagy <nsz@port70.net>
-Date: Mon, 29 Feb 2016 15:04:46 +0000
-Subject: [PATCH] fix * at the start of a BRE subexpression
-
-commit 7eaa76fc2e7993582989d3838b1ac32dd8abac09 made * invalid at
-the start of a BRE subexpression, but it should be accepted as
-literal * there according to the standard.
-
-This patch does not fix subexpressions starting with ^*.
----
- src/regex/regcomp.c | 4 ----
- 1 file changed, 4 deletions(-)
-
-diff --git a/src/regex/regcomp.c b/src/regex/regcomp.c
-index da6abd1..7a2864c 100644
---- a/src/regex/regcomp.c
-+++ b/src/regex/regcomp.c
-@@ -889,7 +889,6 @@ static reg_errcode_t parse_atom(tre_parse_ctx_t *ctx, const char *s)
- s++;
- break;
- case '*':
-- return REG_BADPAT;
- case '{':
- case '+':
- case '?':
-@@ -978,9 +977,6 @@ static reg_errcode_t tre_parse(tre_parse_ctx_t *ctx)
- }
-
- parse_iter:
-- /* extension: repetitions are rejected after an empty node
-- eg. (+), |*, {2}, but assertions are not treated as empty
-- so ^* or $? are accepted currently. */
- for (;;) {
- int min, max;
-
---
-2.7.2
-
diff --git a/main/musl/0003-fix-at-the-start-of-a-complete-BRE.patch b/main/musl/0003-fix-at-the-start-of-a-complete-BRE.patch
deleted file mode 100644
index dac819d007..0000000000
--- a/main/musl/0003-fix-at-the-start-of-a-complete-BRE.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 29b13575376509bb21539711f30c1deaf0823033 Mon Sep 17 00:00:00 2001
-From: Szabolcs Nagy <nsz@port70.net>
-Date: Mon, 29 Feb 2016 16:36:25 +0000
-Subject: [PATCH] fix ^* at the start of a complete BRE
-
-This is a workaround to treat * as literal * at the start of a BRE.
-
-Ideally ^ would be treated as an anchor at the start of any BRE
-subexpression and similarly $ would be an anchor at the end of any
-subexpression. This is not required by the standard and hard to do
-with the current code, but it's the existing practice. If it is
-changed, * should be treated as literal after such anchor as well.
----
- src/regex/regcomp.c | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/src/regex/regcomp.c b/src/regex/regcomp.c
-index 7a2864c..5fad98b 100644
---- a/src/regex/regcomp.c
-+++ b/src/regex/regcomp.c
-@@ -994,6 +994,10 @@ static reg_errcode_t tre_parse(tre_parse_ctx_t *ctx)
- if (*s=='\\')
- s++;
-
-+ /* handle ^* at the start of a complete BRE. */
-+ if (!ere && s==ctx->re+1 && s[-1]=='^')
-+ break;
-+
- /* extension: multiple consecutive *+?{,} is unspecified,
- but (a+)+ has to be supported so accepting a++ makes
- sense, note however that the RE_DUP_MAX limit can be
---
-2.7.2
-
diff --git a/main/musl/0004-math-fix-expf-NAN-and-exp2f-NAN-to-return-NAN-instea.patch b/main/musl/0004-math-fix-expf-NAN-and-exp2f-NAN-to-return-NAN-instea.patch
deleted file mode 100644
index e9eadc9718..0000000000
--- a/main/musl/0004-math-fix-expf-NAN-and-exp2f-NAN-to-return-NAN-instea.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From b023c03b574acdfd73418314a5dcaa83e5cea5a0 Mon Sep 17 00:00:00 2001
-From: Szabolcs Nagy <nsz@port70.net>
-Date: Fri, 4 Mar 2016 21:23:33 +0000
-Subject: [PATCH] math: fix expf(-NAN) and exp2f(-NAN) to return -NAN instead
- of 0
-
-expf(-NAN) was treated as expf(-large) which unconditionally
-returns +0, so special case +-NAN.
-reported by Petr Hosek.
----
- src/math/exp2f.c | 2 ++
- src/math/expf.c | 2 ++
- 2 files changed, 4 insertions(+)
-
-diff --git a/src/math/exp2f.c b/src/math/exp2f.c
-index cf6126e..296b634 100644
---- a/src/math/exp2f.c
-+++ b/src/math/exp2f.c
-@@ -91,6 +91,8 @@ float exp2f(float x)
- /* Filter out exceptional cases. */
- ix = u.i & 0x7fffffff;
- if (ix > 0x42fc0000) { /* |x| > 126 */
-+ if (ix > 0x7f800000) /* NaN */
-+ return x;
- if (u.i >= 0x43000000 && u.i < 0x80000000) { /* x >= 128 */
- x *= 0x1p127f;
- return x;
-diff --git a/src/math/expf.c b/src/math/expf.c
-index 16e9afe..feee2b0 100644
---- a/src/math/expf.c
-+++ b/src/math/expf.c
-@@ -39,6 +39,8 @@ float expf(float x)
-
- /* special cases */
- if (hx >= 0x42aeac50) { /* if |x| >= -87.33655f or NaN */
-+ if (hx > 0x7f800000) /* NaN */
-+ return x;
- if (hx >= 0x42b17218 && !sign) { /* x >= 88.722839f */
- /* overflow */
- x *= 0x1p127f;
---
-2.7.2
-
diff --git a/main/musl/0005-env-avoid-leaving-dangling-pointers-in-__env_map.patch b/main/musl/0005-env-avoid-leaving-dangling-pointers-in-__env_map.patch
deleted file mode 100644
index 411e802fd1..0000000000
--- a/main/musl/0005-env-avoid-leaving-dangling-pointers-in-__env_map.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From 9543656cc32fda48fc463f332ee20e91eed2b768 Mon Sep 17 00:00:00 2001
-From: Alexander Monakov <amonakov@ispras.ru>
-Date: Sun, 6 Mar 2016 20:22:38 +0300
-Subject: [PATCH] env: avoid leaving dangling pointers in __env_map
-
-This is the minimal fix for __putenv leaving a pointer to freed heap
-storage in __env_map array, which could later on lead to errors such
-as double-free.
----
- src/env/putenv.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/src/env/putenv.c b/src/env/putenv.c
-index 4042869..7153042 100644
---- a/src/env/putenv.c
-+++ b/src/env/putenv.c
-@@ -30,6 +30,7 @@ int __putenv(char *s, int a)
- }
- } else {
- free(__env_map[j]);
-+ __env_map[j] = s;
- }
- }
- }
---
-2.7.2
-
diff --git a/main/musl/0006-fix-padding-string-formats-to-width-in-wide-printf-v.patch b/main/musl/0006-fix-padding-string-formats-to-width-in-wide-printf-v.patch
deleted file mode 100644
index c80043e837..0000000000
--- a/main/musl/0006-fix-padding-string-formats-to-width-in-wide-printf-v.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From 4aac019a0efd59011a48d031ad046c934c7e8365 Mon Sep 17 00:00:00 2001
-From: Rich Felker <dalias@aerifal.cx>
-Date: Wed, 16 Mar 2016 16:35:22 -0400
-Subject: [PATCH] fix padding string formats to width in wide printf variants
-
-the idiom fprintf(f, "%.*s", n, "") was wrongly used in vfwprintf as a
-means of producing n spaces; instead it produces no output. the
-correct form is fprintf(f, "%*s", n, ""), using width instead of
-precision, since for %s the later is a maximum rather than a minimum.
----
- src/stdio/vfwprintf.c | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/src/stdio/vfwprintf.c b/src/stdio/vfwprintf.c
-index f06d5ae..f9f1ecf 100644
---- a/src/stdio/vfwprintf.c
-+++ b/src/stdio/vfwprintf.c
-@@ -288,9 +288,9 @@ static int wprintf_core(FILE *f, const wchar_t *fmt, va_list *ap, union arg *nl_
- z = wmemchr(a, 0, p);
- if (z) p=z-a;
- if (w<p) w=p;
-- if (!(fl&LEFT_ADJ)) fprintf(f, "%.*s", w-p, "");
-+ if (!(fl&LEFT_ADJ)) fprintf(f, "%*s", w-p, "");
- out(f, a, p);
-- if ((fl&LEFT_ADJ)) fprintf(f, "%.*s", w-p, "");
-+ if ((fl&LEFT_ADJ)) fprintf(f, "%*s", w-p, "");
- l=w;
- continue;
- case 'm':
-@@ -303,14 +303,14 @@ static int wprintf_core(FILE *f, const wchar_t *fmt, va_list *ap, union arg *nl_
- if (i<0) return -1;
- p=l;
- if (w<p) w=p;
-- if (!(fl&LEFT_ADJ)) fprintf(f, "%.*s", w-p, "");
-+ if (!(fl&LEFT_ADJ)) fprintf(f, "%*s", w-p, "");
- bs = arg.p;
- while (l--) {
- i=mbtowc(&wc, bs, MB_LEN_MAX);
- bs+=i;
- fputwc(wc, f);
- }
-- if ((fl&LEFT_ADJ)) fprintf(f, "%.*s", w-p, "");
-+ if ((fl&LEFT_ADJ)) fprintf(f, "%*s", w-p, "");
- l=w;
- continue;
- }
---
-2.7.4
-
diff --git a/main/musl/0007-fix-gethostbyaddr_r-to-fill-struct-hostent.h_length-.patch b/main/musl/0007-fix-gethostbyaddr_r-to-fill-struct-hostent.h_length-.patch
deleted file mode 100644
index a8d8a5f5a9..0000000000
--- a/main/musl/0007-fix-gethostbyaddr_r-to-fill-struct-hostent.h_length-.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From 5978eb703ce0e64dd778a88c1ffffb76fe5e2202 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>
-Date: Tue, 22 Mar 2016 16:27:51 +0200
-Subject: [PATCH] fix gethostbyaddr_r to fill struct hostent.h_length as
- appropriate
-
----
- src/network/gethostbyaddr_r.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/src/network/gethostbyaddr_r.c b/src/network/gethostbyaddr_r.c
-index 66e0330..0f1e61a 100644
---- a/src/network/gethostbyaddr_r.c
-+++ b/src/network/gethostbyaddr_r.c
-@@ -64,6 +64,7 @@ int gethostbyaddr_r(const void *a, socklen_t l, int af,
- }
-
- h->h_addrtype = af;
-+ h->h_length = l;
- h->h_name = h->h_aliases[0];
- *res = h;
- return 0;
---
-2.7.4
-
diff --git a/main/musl/0008-fix-undefined-pointer-comparison-in-stdio-internal-_.patch b/main/musl/0008-fix-undefined-pointer-comparison-in-stdio-internal-_.patch
deleted file mode 100644
index cd59785b29..0000000000
--- a/main/musl/0008-fix-undefined-pointer-comparison-in-stdio-internal-_.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From 6d1a3dfeaf2caac4033a3c65822fb4e7e14866c7 Mon Sep 17 00:00:00 2001
-From: Rich Felker <dalias@aerifal.cx>
-Date: Mon, 28 Mar 2016 23:41:17 -0400
-Subject: [PATCH] fix undefined pointer comparison in stdio-internal __toread
-
-the comparison f->wpos > f->buf has undefined behavior when f->wpos is
-a null pointer, despite the intuition (and actual compiler behavior,
-for all known compilers) being that NULL > ptr is false for all valid
-pointers ptr.
-
-the purpose of the comparison is to determine if the write buffer is
-non-empty, and the idiom used elsewhere for that is comparison against
-f->wbase, which is either a null pointer when not writing, or equal to
-f->buf when writing. in the former case, both f->wpos and f->wbase are
-null; in the latter they are both non-null and point into the same
-array.
----
- src/stdio/__toread.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/stdio/__toread.c b/src/stdio/__toread.c
-index b08f5bb..35f67b8 100644
---- a/src/stdio/__toread.c
-+++ b/src/stdio/__toread.c
-@@ -3,7 +3,7 @@
- int __toread(FILE *f)
- {
- f->mode |= f->mode-1;
-- if (f->wpos > f->buf) f->write(f, 0, 0);
-+ if (f->wpos > f->wbase) f->write(f, 0, 0);
- f->wpos = f->wbase = f->wend = 0;
- if (f->flags & F_NORD) {
- f->flags |= F_ERR;
---
-2.7.4
-
diff --git a/main/musl/0009-fix-regression-disabling-use-of-pause-instruction-fo.patch b/main/musl/0009-fix-regression-disabling-use-of-pause-instruction-fo.patch
deleted file mode 100644
index 58b2459f89..0000000000
--- a/main/musl/0009-fix-regression-disabling-use-of-pause-instruction-fo.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-From 5c3412d22555d03a1c00578ba8faaa8dc9206420 Mon Sep 17 00:00:00 2001
-From: Rich Felker <dalias@aerifal.cx>
-Date: Tue, 29 Mar 2016 21:22:52 -0400
-Subject: [PATCH] fix regression disabling use of pause instruction for x86
- a_spin
-
-commits e24984efd5c6ac5ea8e6cb6cd914fa8435d458bc and
-16b55298dc4b6a54d287d7494e04542667ef8861 inadvertently disabled the
-a_spin implementations for i386, x86_64, and x32 by defining a macro
-named a_pause instead of a_spin. this should not have caused any
-functional regression, but it inhibited cpu relaxation while spinning
-for locks.
-
-bug reported by George Kulakowski.
----
- arch/i386/atomic_arch.h | 2 +-
- arch/x32/atomic_arch.h | 2 +-
- arch/x86_64/atomic_arch.h | 2 +-
- 3 files changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/arch/i386/atomic_arch.h b/arch/i386/atomic_arch.h
-index 6e67c4c..2b1a049 100644
---- a/arch/i386/atomic_arch.h
-+++ b/arch/i386/atomic_arch.h
-@@ -71,7 +71,7 @@ static inline void a_barrier()
- __asm__ __volatile__( "" : : : "memory" );
- }
-
--#define a_pause a_pause
-+#define a_spin a_spin
- static inline void a_spin()
- {
- __asm__ __volatile__( "pause" : : : "memory" );
-diff --git a/arch/x32/atomic_arch.h b/arch/x32/atomic_arch.h
-index 26098d3..7daf4ae 100644
---- a/arch/x32/atomic_arch.h
-+++ b/arch/x32/atomic_arch.h
-@@ -87,7 +87,7 @@ static inline void a_barrier()
- __asm__ __volatile__( "" : : : "memory" );
- }
-
--#define a_pause a_pause
-+#define a_spin a_spin
- static inline void a_spin()
- {
- __asm__ __volatile__( "pause" : : : "memory" );
-diff --git a/arch/x86_64/atomic_arch.h b/arch/x86_64/atomic_arch.h
-index 9f47f80..55fc6fb 100644
---- a/arch/x86_64/atomic_arch.h
-+++ b/arch/x86_64/atomic_arch.h
-@@ -96,7 +96,7 @@ static inline void a_barrier()
- __asm__ __volatile__( "" : : : "memory" );
- }
-
--#define a_pause a_pause
-+#define a_spin a_spin
- static inline void a_spin()
- {
- __asm__ __volatile__( "pause" : : : "memory" );
---
-2.7.4
-
diff --git a/main/musl/0010-fix-read-past-end-of-haystack-buffer-for-short-needl.patch b/main/musl/0010-fix-read-past-end-of-haystack-buffer-for-short-needl.patch
deleted file mode 100644
index 35c7276d0f..0000000000
--- a/main/musl/0010-fix-read-past-end-of-haystack-buffer-for-short-needl.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From c718f9fc1b4bd913eff10d0c12763f90b2bc487c Mon Sep 17 00:00:00 2001
-From: Rich Felker <dalias@aerifal.cx>
-Date: Fri, 1 Apr 2016 13:36:15 -0400
-Subject: [PATCH] fix read past end of haystack buffer for short needles in
- memmem
-
-the two/three/four byte memmem specializations are not prepared to
-handle haystacks shorter than the needle; they unconditionally read at
-least up to the needle length and subtract from the haystack length.
-if the haystack is shorter, the remaining haystack length underflows
-and produces an unbounded search which will eventually either crash or
-find a spurious match.
-
-the top-level memmem function attempted to avoid this case already by
-checking for haystack shorter than needle, but it failed to re-check
-after using memchr to remove the maximal prefix not containing the
-first byte of the needle.
----
- src/string/memmem.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/src/string/memmem.c b/src/string/memmem.c
-index d7e1221..4be6a31 100644
---- a/src/string/memmem.c
-+++ b/src/string/memmem.c
-@@ -140,6 +140,7 @@ void *memmem(const void *h0, size_t k, const void *n0, size_t l)
- h = memchr(h0, *n, k);
- if (!h || l==1) return (void *)h;
- k -= h - (const unsigned char *)h0;
-+ if (k<l) return 0;
- if (l==2) return twobyte_memmem(h, k, n);
- if (l==3) return threebyte_memmem(h, k, n);
- if (l==4) return fourbyte_memmem(h, k, n);
---
-2.8.2
-
diff --git a/main/musl/0011-fix-FILE-buffer-underflow-in-ungetwc.patch b/main/musl/0011-fix-FILE-buffer-underflow-in-ungetwc.patch
deleted file mode 100644
index 78c716121a..0000000000
--- a/main/musl/0011-fix-FILE-buffer-underflow-in-ungetwc.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From 6ed791e768d83b40ed56c99dbb1ed72c1e49aae7 Mon Sep 17 00:00:00 2001
-From: Rich Felker <dalias@aerifal.cx>
-Date: Tue, 26 Apr 2016 15:26:40 -0400
-Subject: [PATCH] fix FILE buffer underflow in ungetwc
-
-commit 7e816a6487932cbb3cb71d94b609e50e81f4e5bf (version 1.1.11
-release cycle) moved the code that performs wchar_t to multibyte
-conversion across code that used the resulting length in bytes,
-thereby breaking the unget buffer space check in ungetwc and
-clobbering up to three bytes below the start of the buffer.
-
-for allocated FILEs (all read-enabled FILEs except stdin), the
-underflow clobbers at most the FILE-specific locale pointer. no stores
-are performed through this pointer, but subsequent loads may result in
-a crash or mismatching encoding rule (UTF-8 multibyte vs byte-based).
-
-for stdin, the buffer lies in .bss and the underflow may clobber
-another object. in practice, for libc.so the adjacent object seems to
-be stderr's buffer, which is completely unused, but this could vary
-with linking options, or when static linking.
-
-applications which do not attempt to use more than one character of
-ungetwc pushback, or which do not use ungetwc, are not affected.
----
- src/stdio/ungetwc.c | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/src/stdio/ungetwc.c b/src/stdio/ungetwc.c
-index 80d6e20..9edf366 100644
---- a/src/stdio/ungetwc.c
-+++ b/src/stdio/ungetwc.c
-@@ -8,7 +8,7 @@
- wint_t ungetwc(wint_t c, FILE *f)
- {
- unsigned char mbc[MB_LEN_MAX];
-- int l=1;
-+ int l;
- locale_t *ploc = &CURRENT_LOCALE, loc = *ploc;
-
- FLOCK(f);
-@@ -17,8 +17,8 @@ wint_t ungetwc(wint_t c, FILE *f)
- *ploc = f->locale;
-
- if (!f->rpos) __toread(f);
-- if (!f->rpos || f->rpos < f->buf - UNGET + l || c == WEOF ||
-- (!isascii(c) && (l = wctomb((void *)mbc, c)) < 0)) {
-+ if (!f->rpos || c == WEOF || (l = wcrtomb((void *)mbc, c, 0)) < 0 ||
-+ f->rpos < f->buf - UNGET + l) {
- FUNLOCK(f);
- *ploc = loc;
- return WEOF;
---
-2.8.2
-
diff --git a/main/musl/0012-fix-incorrect-protocol-name-and-number-for-egp.patch b/main/musl/0012-fix-incorrect-protocol-name-and-number-for-egp.patch
deleted file mode 100644
index 01858484cd..0000000000
--- a/main/musl/0012-fix-incorrect-protocol-name-and-number-for-egp.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 4b619e5c61d7d4cf344b355be8b1acb0f0795ea9 Mon Sep 17 00:00:00 2001
-From: Andrew Kelley <superjoe30@gmail.com>
-Date: Wed, 4 May 2016 13:29:11 -0700
-Subject: [PATCH] fix incorrect protocol name and number for egp
-
-previously if you called getprotobyname("egp") you would get
-NULL because \008 is invalid octal and so the protocol id was
-interpreted as 0 and name as "8egp".
----
- src/network/proto.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/network/proto.c b/src/network/proto.c
-index a42d145..c4fd34e 100644
---- a/src/network/proto.c
-+++ b/src/network/proto.c
-@@ -12,7 +12,7 @@ static const unsigned char protos[] = {
- "\004ipencap\0"
- "\005st\0"
- "\006tcp\0"
-- "\008egp\0"
-+ "\010egp\0"
- "\014pup\0"
- "\021udp\0"
- "\024hmp\0"
---
-2.8.2
-
diff --git a/main/musl/APKBUILD b/main/musl/APKBUILD
index cd5fe80969..17bc23f24b 100644
--- a/main/musl/APKBUILD
+++ b/main/musl/APKBUILD
@@ -1,8 +1,8 @@
# Contributor: William Pitcock <nenolod@dereferenced.org>
# Maintainer: Timo Teräs <timo.teras@iki.fi>
pkgname=musl
-pkgver=1.1.14
-pkgrel=11
+pkgver=1.1.15
+pkgrel=0
pkgdesc="the musl c library (libc) implementation"
url="http://www.musl-libc.org/"
arch="all"
@@ -12,20 +12,6 @@ depends_dev="!uclibc-dev"
makedepends="$depends_dev"
subpackages="$pkgname-dev $pkgname-utils $pkgname-dbg libc6-compat:compat"
source="http://www.musl-libc.org/releases/musl-$pkgver.tar.gz
- 0001-handle-non-matching-address-family-entries-in-hosts-.patch
- 0002-fix-at-the-start-of-a-BRE-subexpression.patch
- 0003-fix-at-the-start-of-a-complete-BRE.patch
- 0004-math-fix-expf-NAN-and-exp2f-NAN-to-return-NAN-instea.patch
- 0005-env-avoid-leaving-dangling-pointers-in-__env_map.patch
- 0006-fix-padding-string-formats-to-width-in-wide-printf-v.patch
- 0007-fix-gethostbyaddr_r-to-fill-struct-hostent.h_length-.patch
- 0008-fix-undefined-pointer-comparison-in-stdio-internal-_.patch
- 0009-fix-regression-disabling-use-of-pause-instruction-fo.patch
- 0010-fix-read-past-end-of-haystack-buffer-for-short-needl.patch
- 0011-fix-FILE-buffer-underflow-in-ungetwc.patch
- 0012-fix-incorrect-protocol-name-and-number-for-egp.patch
- 0001-check-result-from-res_mkquery.patch
- fix-failure-to-obtain-EOWNERDEAD-status-for-process-shared-robust-mutexes.patch
ldconfig
__stack_chk_fail_local.c
@@ -67,6 +53,7 @@ build() {
# note: not autotools
LDFLAGS="$LDFLAGS -Wl,-soname,libc.musl-${CARCH}.so.1" \
./configure \
+ --build=$CBUILD \
--host=$CHOST \
--prefix=/usr \
--sysconfdir=/etc \
@@ -132,61 +119,19 @@ compat() {
done
}
-md5sums="d529ce4a2f7f79d8c3fd4b8329417b57 musl-1.1.14.tar.gz
-c683094384c5726a99d1047f01aeb331 0001-handle-non-matching-address-family-entries-in-hosts-.patch
-3b9089a017ac90b303fad94a6aa71219 0002-fix-at-the-start-of-a-BRE-subexpression.patch
-6cee220f293754cd1e7126f3d4db5b43 0003-fix-at-the-start-of-a-complete-BRE.patch
-476dc9157a7ac6de5bb6f7c5a5ef7a2d 0004-math-fix-expf-NAN-and-exp2f-NAN-to-return-NAN-instea.patch
-a372031134c17cefb9aad3c9c0e6bb19 0005-env-avoid-leaving-dangling-pointers-in-__env_map.patch
-d85fdb4d80c8372d8e63cf4382e4012a 0006-fix-padding-string-formats-to-width-in-wide-printf-v.patch
-882309436377613d8b65a1fed573f125 0007-fix-gethostbyaddr_r-to-fill-struct-hostent.h_length-.patch
-4701e50c55b520e644c9e9a94e851d7f 0008-fix-undefined-pointer-comparison-in-stdio-internal-_.patch
-a2457ce90f3e4d5ef04005b6f42e9bc3 0009-fix-regression-disabling-use-of-pause-instruction-fo.patch
-5cbd4551e71b317e1125e9cbe08e9a6d 0010-fix-read-past-end-of-haystack-buffer-for-short-needl.patch
-1a54c766a86a56946ee53f9515410670 0011-fix-FILE-buffer-underflow-in-ungetwc.patch
-67ca785b787c53316397f96d21afab31 0012-fix-incorrect-protocol-name-and-number-for-egp.patch
-3e78b4c125b0c3f06c06a9b4ade8e18d 0001-check-result-from-res_mkquery.patch
-34e04b179e4b4a1fdedd27cd27455271 fix-failure-to-obtain-EOWNERDEAD-status-for-process-shared-robust-mutexes.patch
+md5sums="9590a9d47ee64f220b3c12f7afb864ca musl-1.1.15.tar.gz
830d01f7821b978df770b06db3790921 ldconfig
0df687757221bbb0fc1aa67f1bd646f9 __stack_chk_fail_local.c
57ef2c63b9ec6a2041694ace97d4ffa2 getconf.c
2b941c4251cac44988a4abfc50e21267 getent.c
45f92f8d59cf84d765de698a9578dbf4 iconv.c"
-sha256sums="35f6c00c84a6091bd5dab29eedde7508dae755ead92dcc0239f3677d1055b9b5 musl-1.1.14.tar.gz
-87d3161c69b347c1cb826a886d098bc03a17a00172c5839c4e30ed1745fb92ec 0001-handle-non-matching-address-family-entries-in-hosts-.patch
-0bd21cab29a7a2f6644d1046e7bd91dd5aadf6748e207ddda3ff99e353548775 0002-fix-at-the-start-of-a-BRE-subexpression.patch
-13d285aba7e5e33dca32e6adbb5ada69f0f88f0320968b201d03fe02f1a70d4c 0003-fix-at-the-start-of-a-complete-BRE.patch
-e4e36277864e1445295be1397c930c649905ddfa32f1ed65c6defb67f78dd0e8 0004-math-fix-expf-NAN-and-exp2f-NAN-to-return-NAN-instea.patch
-02cd2b0c92ab04a7e39ab4bf53687bc3354b8fffe3cb4aba9cb630532ce43d4a 0005-env-avoid-leaving-dangling-pointers-in-__env_map.patch
-6037fa5aee8dba3d3b01ded5752d876954c23da3a53ed5a734f0816a2ef1d4bd 0006-fix-padding-string-formats-to-width-in-wide-printf-v.patch
-7cec62c7a4ee9d1fa5cd79391aabe9363006ccc6c942fd09924b038e7224f144 0007-fix-gethostbyaddr_r-to-fill-struct-hostent.h_length-.patch
-b937311664b96b6272e4e62e1aa0d44edd58c825cbb95746c82fab85a6390968 0008-fix-undefined-pointer-comparison-in-stdio-internal-_.patch
-4eefc6e8e95da425a519e093e6f9e15390d498070759256de4d86a89679236b9 0009-fix-regression-disabling-use-of-pause-instruction-fo.patch
-3cfd4b886b5aa99d48a4bc814e3ac11690fdd166a9fc02da13274cd9acb2260b 0010-fix-read-past-end-of-haystack-buffer-for-short-needl.patch
-b19de98d4c4051c2ff89b5f4b2705444f6f4c44a639692bedfa30a71b965fd04 0011-fix-FILE-buffer-underflow-in-ungetwc.patch
-8721a088af8aa388c771174eb8e9b19cc96c47fe07d2fa8c70a640cdb7d52221 0012-fix-incorrect-protocol-name-and-number-for-egp.patch
-7e5b08404da6f306ab8da9e81107a7901415d612069103d6f7b6b8e6ea504959 0001-check-result-from-res_mkquery.patch
-87e1b3398abf440b6757a61d40511714f8b97e1dfca09c406347842e885ff444 fix-failure-to-obtain-EOWNERDEAD-status-for-process-shared-robust-mutexes.patch
+sha256sums="97e447c7ee2a7f613186ec54a93054fe15469fe34d7d323080f7ef38f5ecb0fa musl-1.1.15.tar.gz
b4a2c06db38742e8c42c3c9838b285a7d8cdac6c091ff3df5ff9a15f1e41b9c7 ldconfig
299a7d75a09de3e2e11e7fb4acc3182e4a14e868093d2f30938fce9bfcff13da __stack_chk_fail_local.c
d87d0cbb3690ae2c5d8cc218349fd8278b93855dd625deaf7ae50e320aad247c getconf.c
68373a55e89ce85c562d941ccf588337d6cc6c9c17689d695f65cd7607134bbe getent.c
f79a2930a2e5bb0624321589edf8b889d1e9b603e01e6b7ae214616605b3fdd7 iconv.c"
-sha512sums="9016246b44a7e6ef51477f0a246373c79f3e796c70031c3323be1b6c4c0518a2d4578f1aa712adfd9a80cdc1d71918bd7a35855052a0452b854755bf0cc2424e musl-1.1.14.tar.gz
-8546b31b04effe8d863e26ecd1677890e925b0f65f46e09f03804024c36595c944c3d7e758160f57862b9e6c85e431139ff8b2412a29c57eb9773cce327647a5 0001-handle-non-matching-address-family-entries-in-hosts-.patch
-18b2f436de9e1c3b8720c93d4a013f069f1f7bb8d71203c157a4670b4fa5749347fd2eba74b47e527f9bb7d98442eaf69837ee69ea1840bf6d1577f14029f089 0002-fix-at-the-start-of-a-BRE-subexpression.patch
-51a16e88f602d1db175d82d8276273006b74dc7e87340207e26db80820bab368c50f4d1539175bf3b5b3b23ae6da2e452e81f858029bfef49c54f548bc1a4674 0003-fix-at-the-start-of-a-complete-BRE.patch
-bae8e0f4a1f73be42450945058c1106957da56dc7fa087515dd51bcac3c7099c4cfe4e8c44fb8efc059944d0675858b747396d60c884b031663983912262e992 0004-math-fix-expf-NAN-and-exp2f-NAN-to-return-NAN-instea.patch
-202f21518ca75373712430fb547662e7a4936c6947cb61fe97fd5dbd9f48217ca38f90439d51b03cafce9a2bfd90e360182a454f3b941abae033d90f2bffe50c 0005-env-avoid-leaving-dangling-pointers-in-__env_map.patch
-fb30c3d1113e3cdaf575b37257b1184f2d5cc7cea0eb0ee94a71e861f9c72fe924de5f63826701584f68c9e1c9c4c1357a967ebe00f637312193e268f7a7cf94 0006-fix-padding-string-formats-to-width-in-wide-printf-v.patch
-ffb52c8a24bfa5fcad0561c6c4f6f265b0b3666f0c6e8c0a12b1f11c9aeb1c51b17f4f0fccdd70a3e94dccb17650efaf24635cd12b64d12c09469ca1399d99d7 0007-fix-gethostbyaddr_r-to-fill-struct-hostent.h_length-.patch
-afa17d63f3de02661709d3712d1586b3173518476d314ca2b1e72a3814536538c81aefa5a4ec0cee3470af7177dd4842ab6e62e891ae85a88102bb703ba09c59 0008-fix-undefined-pointer-comparison-in-stdio-internal-_.patch
-5818f2563a7a335aec2cbaaeb4acb80d1380206dd03110331adb09fd1279c84f09883e2f92e0d8964079acf3d4fc173c1b5073091c874c492f2f5a966e1cccb7 0009-fix-regression-disabling-use-of-pause-instruction-fo.patch
-c0cf860bc7c6259dc626a1178258010e4ea6588f1ecd6c6c69ed85f11c5f0f6c502f59af3d9655bb92f05263ffd06c8fe4aed3939e105c00f783b9c7975ac9ff 0010-fix-read-past-end-of-haystack-buffer-for-short-needl.patch
-93a696ef060f4a7c9efe32589e3f8e0bb08cbbae6d0f9852aef8555f2f095f0d50431f55647ee8b59599916b0c90bb4aa251be495d3d2697b36c7cad5c9375a4 0011-fix-FILE-buffer-underflow-in-ungetwc.patch
-78f1952b786cd4c31d956e169a6362d0f3007d68cb95308f88ae556dac88689cfa0e94856e5e8f727b1f27a9df5b35dab0fec8f3df4d925207c4980eb4e9f80f 0012-fix-incorrect-protocol-name-and-number-for-egp.patch
-d1e393976546216a6de28b00a5b405a14d2cdf71945b695c3b45cd636f213ad037108f42301f21f213dbdac4dbce977813aea62cf9cee9f74432e1475e11ce22 0001-check-result-from-res_mkquery.patch
-b3d62e1dc83586c5babd68491dc6d0c8022b4bc234cdaf45726a0ebe35ce32ec85a39a69949bffa37110f0a4d8af8c9ecc5c1e9d76a0b131f20e6013a43feff3 fix-failure-to-obtain-EOWNERDEAD-status-for-process-shared-robust-mutexes.patch
+sha512sums="9e923572c0d6bad3dc2d2646d4b0699c10b477ce6300ac6c6224895192a90667f581ddf6eda2ab8c4c16f47bde4bccb03bb90478638d136d9df721430f4d0163 musl-1.1.15.tar.gz
8d3a2d5315fc56fee7da9abb8b89bb38c6046c33d154c10d168fb35bfde6b0cf9f13042a3bceee34daf091bc409d699223735dcf19f382eeee1f6be34154f26f ldconfig
062bb49fa54839010acd4af113e20f7263dde1c8a2ca359b5fb2661ef9ed9d84a0f7c3bc10c25dcfa10bb3c5a4874588dff636ac43d5dbb3d748d75400756d0b __stack_chk_fail_local.c
0d80f37b34a35e3d14b012257c50862dfeb9d2c81139ea2dfa101d981d093b009b9fa450ba27a708ac59377a48626971dfc58e20a3799084a65777a0c32cbc7d getconf.c
diff --git a/main/musl/fix-failure-to-obtain-EOWNERDEAD-status-for-process-shared-robust-mutexes.patch b/main/musl/fix-failure-to-obtain-EOWNERDEAD-status-for-process-shared-robust-mutexes.patch
deleted file mode 100644
index 445fa80455..0000000000
--- a/main/musl/fix-failure-to-obtain-EOWNERDEAD-status-for-process-shared-robust-mutexes.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-commit 384d103d94dba0472a587861f67d7ed6e8955f86
-Author: Rich Felker <dalias@aerifal.cx>
-Date: Mon Jun 27 15:18:13 2016 -0400
-
- fix failure to obtain EOWNERDEAD status for process-shared robust mutexes
-
- Linux's documentation (robust-futex-ABI.txt) claims that, when a
- process dies with a futex on the robust list, bit 30 (0x40000000) is
- set to indicate the status. however, what actually happens is that
- bits 0-30 are replaced with the value 0x40000000, i.e. bits 0-29
- (containing the old owner tid) are cleared at the same time bit 30 is
- set.
-
- our userspace-side code for robust mutexes was written based on that
- documentation, assuming that kernel would never produce a futex value
- of 0x40000000, since the low (owner) bits would always be non-zero.
- commit d338b506e39b1e2c68366b12be90704c635602ce introduced this
- assumption explicitly while fixing another bug in how non-recoverable
- status for robust mutexes was tracked. presumably the tests conducted
- at that time only checked non-process-shared robust mutexes, which are
- handled in pthread_exit (which implemented the documented kernel
- protocol, not the actual one) rather than by the kernel.
-
- change pthread_exit robust list processing to match the kernel
- behavior, clearing bits 0-29 while setting bit 30, and use the value
- 0x7fffffff instead of 0x40000000 to encode non-recoverable status. the
- choice of value here is arbitrary; any value with at least one of bits
- 0-29 set should work just as well,
-
-diff --git a/src/thread/pthread_create.c b/src/thread/pthread_create.c
-index e7df34a..9f6b98e 100644
---- a/src/thread/pthread_create.c
-+++ b/src/thread/pthread_create.c
-@@ -79,7 +79,7 @@ _Noreturn void __pthread_exit(void *result)
- int priv = (m->_m_type & 128) ^ 128;
- self->robust_list.pending = rp;
- self->robust_list.head = *rp;
-- int cont = a_swap(&m->_m_lock, self->tid|0x40000000);
-+ int cont = a_swap(&m->_m_lock, 0x40000000);
- self->robust_list.pending = 0;
- if (cont < 0 || waiters)
- __wake(&m->_m_lock, 1, priv);
-diff --git a/src/thread/pthread_mutex_trylock.c b/src/thread/pthread_mutex_trylock.c
-index 0df3ce2..54876a6 100644
---- a/src/thread/pthread_mutex_trylock.c
-+++ b/src/thread/pthread_mutex_trylock.c
-@@ -14,7 +14,7 @@ int __pthread_mutex_trylock_owner(pthread_mutex_t *m)
- m->_m_count++;
- return 0;
- }
-- if (own == 0x40000000) return ENOTRECOVERABLE;
-+ if (own == 0x7fffffff) return ENOTRECOVERABLE;
-
- if (m->_m_type & 128) {
- if (!self->robust_list.off) {
-diff --git a/src/thread/pthread_mutex_unlock.c b/src/thread/pthread_mutex_unlock.c
-index 02da92a..7dd00d2 100644
---- a/src/thread/pthread_mutex_unlock.c
-+++ b/src/thread/pthread_mutex_unlock.c
-@@ -24,7 +24,7 @@ int __pthread_mutex_unlock(pthread_mutex_t *m)
- if (next != &self->robust_list.head) *(volatile void *volatile *)
- ((char *)next - sizeof(void *)) = prev;
- }
-- cont = a_swap(&m->_m_lock, (type & 8) ? 0x40000000 : 0);
-+ cont = a_swap(&m->_m_lock, (type & 8) ? 0x7fffffff : 0);
- if (type != PTHREAD_MUTEX_NORMAL && !priv) {
- self->robust_list.pending = 0;
- __vm_unlock();
-