diff options
39 files changed, 5 insertions, 2376 deletions
diff --git a/main/musl/0001-fix-asctime-day-month-names-not-to-vary-by-locale.patch b/main/musl/0001-fix-asctime-day-month-names-not-to-vary-by-locale.patch deleted file mode 100644 index 0bd1ddb077..0000000000 --- a/main/musl/0001-fix-asctime-day-month-names-not-to-vary-by-locale.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 6399fa9d29ea83de4735680b77d457bd59606532 Mon Sep 17 00:00:00 2001 -From: Rich Felker <dalias@aerifal.cx> -Date: Thu, 7 Jul 2016 16:51:37 -0400 -Subject: [PATCH] fix asctime day/month names not to vary by locale - -the FIXME comment here was overlooked at the time locale support was -added. ---- - src/time/__asctime.c | 9 ++++----- - 1 file changed, 4 insertions(+), 5 deletions(-) - -diff --git a/src/time/__asctime.c b/src/time/__asctime.c -index e7e7f07..f114dfe 100644 ---- a/src/time/__asctime.c -+++ b/src/time/__asctime.c -@@ -1,17 +1,16 @@ - #include <time.h> - #include <stdio.h> - #include <langinfo.h> -+#include "locale_impl.h" - #include "atomic.h" - --const char *__nl_langinfo(nl_item); -+const char *__nl_langinfo_l(nl_item, locale_t); - - char *__asctime(const struct tm *restrict tm, char *restrict buf) - { -- /* FIXME: change __nl_langinfo to __nl_langinfo_l with explicit C -- * locale once we have locales */ - if (snprintf(buf, 26, "%.3s %.3s%3d %.2d:%.2d:%.2d %d\n", -- __nl_langinfo(ABDAY_1+tm->tm_wday), -- __nl_langinfo(ABMON_1+tm->tm_mon), -+ __nl_langinfo_l(ABDAY_1+tm->tm_wday, C_LOCALE), -+ __nl_langinfo_l(ABMON_1+tm->tm_mon, C_LOCALE), - tm->tm_mday, tm->tm_hour, - tm->tm_min, tm->tm_sec, - 1900 + tm->tm_year) >= 26) --- -2.9.1 - diff --git a/main/musl/0001-verify-that-ttyname-refers-to-the-same-file-as-the-f.patch b/main/musl/0001-verify-that-ttyname-refers-to-the-same-file-as-the-f.patch deleted file mode 100644 index 83b2e2a42d..0000000000 --- a/main/musl/0001-verify-that-ttyname-refers-to-the-same-file-as-the-f.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 0a950dcf15bb9f7274c804dca490e9e20e475f3e Mon Sep 17 00:00:00 2001 -From: Szabolcs Nagy <nsz@port70.net> -Date: Sat, 20 Aug 2016 21:04:31 +0200 -Subject: [PATCH 1/1] verify that ttyname refers to the same file as the fd - -linux containers use separate mount namespace so the /proc -symlink might not point to the right device if the fd was -opened in the parent namespace, in this case return ENOENT. ---- - src/unistd/ttyname_r.c | 15 +++++++++++---- - 1 file changed, 11 insertions(+), 4 deletions(-) - -diff --git a/src/unistd/ttyname_r.c b/src/unistd/ttyname_r.c -index 8bac7b2..a38ba4f 100644 ---- a/src/unistd/ttyname_r.c -+++ b/src/unistd/ttyname_r.c -@@ -1,10 +1,12 @@ - #include <unistd.h> - #include <errno.h> -+#include <sys/stat.h> - - void __procfdname(char *, unsigned); - - int ttyname_r(int fd, char *name, size_t size) - { -+ struct stat st1, st2; - char procname[sizeof "/proc/self/fd/" + 3*sizeof(int) + 2]; - ssize_t l; - -@@ -15,8 +17,13 @@ int ttyname_r(int fd, char *name, size_t size) - - if (l < 0) return errno; - else if (l == size) return ERANGE; -- else { -- name[l] = 0; -- return 0; -- } -+ -+ name[l] = 0; -+ -+ if (stat(name, &st1) || fstat(fd, &st2)) -+ return errno; -+ if (st1.st_dev != st2.st_dev || st1.st_ino != st2.st_ino) -+ return ENOENT; -+ -+ return 0; - } --- -2.10.1 - diff --git a/main/musl/0002-math-fix-128bit-long-double-inverse-trigonometric-fu.patch b/main/musl/0002-math-fix-128bit-long-double-inverse-trigonometric-fu.patch deleted file mode 100644 index ea9d1f19eb..0000000000 --- a/main/musl/0002-math-fix-128bit-long-double-inverse-trigonometric-fu.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 5b5db97f7e80bde2678aed72336a28375e800354 Mon Sep 17 00:00:00 2001 -From: Szabolcs Nagy <nsz@port70.net> -Date: Tue, 23 Aug 2016 21:47:53 +0200 -Subject: [PATCH 2/2] math: fix 128bit long double inverse trigonometric - functions - -there was a copy paste error that could cause large ulp errors -in atan2l, atanl, asinl and acosl on aarch64, mips64 and mipsn32. - -(the implementation is from freebsd fdlibm, but the tail end -of the polynomial was wrong. 128 bit long double functions -are not yet tested so this went undetected.) ---- - src/math/__invtrigl.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/math/__invtrigl.c b/src/math/__invtrigl.c -index ef7f4e1..48f83aa 100644 ---- a/src/math/__invtrigl.c -+++ b/src/math/__invtrigl.c -@@ -57,7 +57,7 @@ long double __invtrigl_R(long double z) - { - long double p, q; - p = z*(pS0+z*(pS1+z*(pS2+z*(pS3+z*(pS4+z*(pS5+z*(pS6+z*(pS7+z*(pS8+z*pS9))))))))); -- q = 1.0+z*(qS1+z*(qS2+z*(qS3+z*(qS4+z*(qS5+z*(pS6+z*(pS7+z*(pS8+z*pS9)))))))); -+ q = 1.0+z*(qS1+z*(qS2+z*(qS3+z*(qS4+z*(qS5+z*(qS6+z*(qS7+z*(qS8+z*qS9)))))))); - return p/q; - } - #endif --- -2.10.1 - diff --git a/main/musl/0003-fix-FFSYNC-by-changing-it-to-O_SYNC.patch b/main/musl/0003-fix-FFSYNC-by-changing-it-to-O_SYNC.patch deleted file mode 100644 index ba0415efba..0000000000 --- a/main/musl/0003-fix-FFSYNC-by-changing-it-to-O_SYNC.patch +++ /dev/null @@ -1,26 +0,0 @@ -From c1f4ed150137d793c9d07356305a89e8785e7e02 Mon Sep 17 00:00:00 2001 -From: Duncan Overbruck <duncaen@voidlinux.eu> -Date: Thu, 18 Aug 2016 17:06:16 +0200 -Subject: [PATCH 3/3] fix FFSYNC by changing it to O_SYNC - -O_FSYNC was never defined and is legacy/wrong, nothing seems to use it. ---- - include/fcntl.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/include/fcntl.h b/include/fcntl.h -index e683e4d..0e165ca 100644 ---- a/include/fcntl.h -+++ b/include/fcntl.h -@@ -99,7 +99,7 @@ int posix_fallocate(int, off_t, off_t); - #define AT_EMPTY_PATH 0x1000 - - #define FAPPEND O_APPEND --#define FFSYNC O_FSYNC -+#define FFSYNC O_SYNC - #define FASYNC O_ASYNC - #define FNONBLOCK O_NONBLOCK - #define FNDELAY O_NDELAY --- -2.10.1 - diff --git a/main/musl/0004-getdtablesize-fix-returning-hard-instead-of-soft-rli.patch b/main/musl/0004-getdtablesize-fix-returning-hard-instead-of-soft-rli.patch deleted file mode 100644 index 1ea0965f7c..0000000000 --- a/main/musl/0004-getdtablesize-fix-returning-hard-instead-of-soft-rli.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 397586625e71d166f493f16bfe04f3005ae464c3 Mon Sep 17 00:00:00 2001 -From: Olivier Brunel <jjk@jjacky.com> -Date: Sat, 13 Aug 2016 20:31:49 +0200 -Subject: [PATCH 4/4] getdtablesize: fix returning hard instead of soft rlimit - -This makes the result consistent with sysconf(_SC_OPEN_MAX). ---- - src/legacy/getdtablesize.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/legacy/getdtablesize.c b/src/legacy/getdtablesize.c -index 682da6d..b30c193 100644 ---- a/src/legacy/getdtablesize.c -+++ b/src/legacy/getdtablesize.c -@@ -7,5 +7,5 @@ int getdtablesize(void) - { - struct rlimit rl; - getrlimit(RLIMIT_NOFILE, &rl); -- return rl.rlim_max < INT_MAX ? rl.rlim_max : INT_MAX; -+ return rl.rlim_cur < INT_MAX ? rl.rlim_cur : INT_MAX; - } --- -2.10.1 - diff --git a/main/musl/0005-restore-_Noreturn-to-__assert_fail.patch b/main/musl/0005-restore-_Noreturn-to-__assert_fail.patch deleted file mode 100644 index c02dc267a4..0000000000 --- a/main/musl/0005-restore-_Noreturn-to-__assert_fail.patch +++ /dev/null @@ -1,48 +0,0 @@ -From e738b8cbe64b6dd3ed9f47b6d4cd7eb2c422b38d Mon Sep 17 00:00:00 2001 -From: Rich Felker <dalias@aerifal.cx> -Date: Tue, 30 Aug 2016 16:39:54 -0400 -Subject: [PATCH 5/5] restore _Noreturn to __assert_fail - -this reverts commit 2c1f8fd5da3306fd7c8a2267467e44eb61f12dd4. without -the _Noreturn attribute, the compiler cannot use asserts to perform -reachability/range analysis. this leads to missed optimizations and -spurious warnings. - -the original backtrace problem that prompted the removal of _Noreturn -was not clearly documented at the time, but it seems to happen only -when libc was built without -g, which also breaks many other -backtracing cases. ---- - include/assert.h | 2 +- - src/exit/assert.c | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/include/assert.h b/include/assert.h -index e679adb..d14ec94 100644 ---- a/include/assert.h -+++ b/include/assert.h -@@ -16,7 +16,7 @@ - extern "C" { - #endif - --void __assert_fail (const char *, const char *, int, const char *); -+_Noreturn void __assert_fail (const char *, const char *, int, const char *); - - #ifdef __cplusplus - } -diff --git a/src/exit/assert.c b/src/exit/assert.c -index e87442a..49b0dc3 100644 ---- a/src/exit/assert.c -+++ b/src/exit/assert.c -@@ -1,7 +1,7 @@ - #include <stdio.h> - #include <stdlib.h> - --void __assert_fail(const char *expr, const char *file, int line, const char *func) -+_Noreturn void __assert_fail(const char *expr, const char *file, int line, const char *func) - { - fprintf(stderr, "Assertion failed: %s (%s: %s: %d)\n", expr, file, func, line); - fflush(NULL); --- -2.10.1 - diff --git a/main/musl/0006-fix-printf-regression-with-alt-form-octal-zero-flag-.patch b/main/musl/0006-fix-printf-regression-with-alt-form-octal-zero-flag-.patch deleted file mode 100644 index 918155bb85..0000000000 --- a/main/musl/0006-fix-printf-regression-with-alt-form-octal-zero-flag-.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 78897b0dc00b7cd5c29af5e0b7eebf2396d8dce0 Mon Sep 17 00:00:00 2001 -From: Rich Felker <dalias@aerifal.cx> -Date: Fri, 16 Sep 2016 17:40:08 -0400 -Subject: [PATCH 06/11] fix printf regression with alt-form octal, zero flag, - and field width - -commit b91cdbe2bc8b626aa04dc6e3e84345accf34e4b1, in fixing another -issue, changed the logic for how alt-form octal adds the leading zero -to adjust the precision rather than using a prefix character. this -wrongly suppressed the zero flag by mimicing an explicit precision -given by the format string. switch back to using a prefix character. - -based on bug report and patch by Dmitry V. Levin, but simplified. ---- - src/stdio/vfprintf.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/stdio/vfprintf.c b/src/stdio/vfprintf.c -index 2ecf769..e439a07 100644 ---- a/src/stdio/vfprintf.c -+++ b/src/stdio/vfprintf.c -@@ -570,7 +570,7 @@ static int printf_core(FILE *f, const char *fmt, va_list *ap, union arg *nl_arg, - if (0) { - case 'o': - a = fmt_o(arg.i, z); -- if ((fl&ALT_FORM) && p<z-a+1) p=z-a+1; -+ if ((fl&ALT_FORM) && p<z-a+1) prefix+=5, pl=1; - } if (0) { - case 'd': case 'i': - pl=1; --- -2.10.1 - diff --git a/main/musl/0007-fix-ifru_data-and-ifcu_buf-types-in-net-if.h.patch b/main/musl/0007-fix-ifru_data-and-ifcu_buf-types-in-net-if.h.patch deleted file mode 100644 index d9eac27c88..0000000000 --- a/main/musl/0007-fix-ifru_data-and-ifcu_buf-types-in-net-if.h.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 3848a99f65952a77c03bbd905cae988f37f13ea6 Mon Sep 17 00:00:00 2001 -From: Daniel Sabogal <dsabogalcc@gmail.com> -Date: Fri, 16 Sep 2016 13:34:24 -0400 -Subject: [PATCH 07/11] fix ifru_data and ifcu_buf types in net/if.h - -glibc, freebsd, and openbsd use character pointers (caddr_t) for -these fields. only linux uses void pointer for the ifru_data type. ---- - include/net/if.h | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/include/net/if.h b/include/net/if.h -index 1a4059d..2f2fcc1 100644 ---- a/include/net/if.h -+++ b/include/net/if.h -@@ -89,7 +89,7 @@ struct ifreq { - struct ifmap ifru_map; - char ifru_slave[IFNAMSIZ]; - char ifru_newname[IFNAMSIZ]; -- void *ifru_data; -+ char *ifru_data; - } ifr_ifru; - }; - -@@ -116,7 +116,7 @@ struct ifreq { - struct ifconf { - int ifc_len; - union { -- void *ifcu_buf; -+ char *ifcu_buf; - struct ifreq *ifcu_req; - } ifc_ifcu; - }; --- -2.10.1 - diff --git a/main/musl/0008-fix-if_indextoname-error-case.patch b/main/musl/0008-fix-if_indextoname-error-case.patch deleted file mode 100644 index e778996366..0000000000 --- a/main/musl/0008-fix-if_indextoname-error-case.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 32055d52ca43d867d6dbb763dc5213a8d3536a23 Mon Sep 17 00:00:00 2001 -From: Daniel Sabogal <dsabogalcc@gmail.com> -Date: Thu, 15 Sep 2016 11:27:30 -0400 -Subject: [PATCH 08/11] fix if_indextoname error case - -posix requires errno to be set to ENXIO if the interface does not exist. -linux returns ENODEV instead so we handle this. ---- - src/network/if_indextoname.c | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - -diff --git a/src/network/if_indextoname.c b/src/network/if_indextoname.c -index 6ee7f13..3b368bf 100644 ---- a/src/network/if_indextoname.c -+++ b/src/network/if_indextoname.c -@@ -3,6 +3,7 @@ - #include <sys/socket.h> - #include <sys/ioctl.h> - #include <string.h> -+#include <errno.h> - #include "syscall.h" - - char *if_indextoname(unsigned index, char *name) -@@ -14,5 +15,9 @@ char *if_indextoname(unsigned index, char *name) - ifr.ifr_ifindex = index; - r = ioctl(fd, SIOCGIFNAME, &ifr); - __syscall(SYS_close, fd); -- return r < 0 ? 0 : strncpy(name, ifr.ifr_name, IF_NAMESIZE); -+ if (r < 0) { -+ if (errno == ENODEV) errno = ENXIO; -+ return 0; -+ } -+ return strncpy(name, ifr.ifr_name, IF_NAMESIZE); - } --- -2.10.1 - diff --git a/main/musl/0009-add-missing-_unlocked-and-wcsftime_l-prototypes-to-w.patch b/main/musl/0009-add-missing-_unlocked-and-wcsftime_l-prototypes-to-w.patch deleted file mode 100644 index fca0fcb406..0000000000 --- a/main/musl/0009-add-missing-_unlocked-and-wcsftime_l-prototypes-to-w.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 5505f6afae9acf37ef565c68a07ca3df7b1ae2cb Mon Sep 17 00:00:00 2001 -From: Daniel Sabogal <dsabogalcc@gmail.com> -Date: Fri, 9 Sep 2016 21:23:17 -0400 -Subject: [PATCH 09/11] add missing *_unlocked and wcsftime_l prototypes to - wchar.h - -these functions had been implemented, but prototypes were not made available ---- - include/wchar.h | 15 +++++++++++++++ - 1 file changed, 15 insertions(+) - -diff --git a/include/wchar.h b/include/wchar.h -index 0167dce..3e6db5f 100644 ---- a/include/wchar.h -+++ b/include/wchar.h -@@ -136,6 +136,21 @@ size_t wcsftime (wchar_t *__restrict, size_t, const wchar_t *__restrict, const s - - #undef iswdigit - -+#if defined(_GNU_SOURCE) -+wint_t fgetwc_unlocked (FILE *); -+wint_t getwc_unlocked (FILE *); -+wint_t getwchar_unlocked (void); -+wint_t fputwc_unlocked (wchar_t, FILE *); -+wint_t putwc_unlocked (wchar_t, FILE *); -+wint_t putwchar_unlocked (wchar_t); -+wchar_t *fgetws_unlocked (wchar_t *__restrict, int, FILE *__restrict); -+int fputws_unlocked (const wchar_t *__restrict, FILE *__restrict); -+#endif -+ -+#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) -+size_t wcsftime_l (wchar_t *__restrict, size_t, const wchar_t *__restrict, const struct tm *__restrict, locale_t); -+#endif -+ - #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \ - || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE) - FILE *open_wmemstream(wchar_t **, size_t *); --- -2.10.1 - diff --git a/main/musl/0010-simplify-refactor-fflush-and-make-fflush_unlocked-an.patch b/main/musl/0010-simplify-refactor-fflush-and-make-fflush_unlocked-an.patch deleted file mode 100644 index ba6483bb78..0000000000 --- a/main/musl/0010-simplify-refactor-fflush-and-make-fflush_unlocked-an.patch +++ /dev/null @@ -1,102 +0,0 @@ -From c002668eb0352e619ea7064e4940b397b4a6e68d Mon Sep 17 00:00:00 2001 -From: Rich Felker <dalias@aerifal.cx> -Date: Sun, 18 Sep 2016 21:45:47 -0400 -Subject: [PATCH 10/11] simplify/refactor fflush and make fflush_unlocked an - alias for fflush - -previously, fflush_unlocked was an alias for an internal backend that -was called by fflush, either for its argument or in a loop for each -file if a null pointer was passed. since the logic for the latter was -in the main fflush function, fflush_unlocked crashed when passed a -null pointer, rather than flushing all open files. since -fflush_unlocked is not a standard function and has no specification, -it's not clear whether it should be expected to accept null pointers -like fflush does, but a reasonable argument could be made that it -should. - -this patch eliminates the helper function, simplifying fflush, and -makes fflush_unlocked an alias for fflush, which is valid because the -two functions agree in their behavior in all cases where their -behavior is defined (the unlocked version has undefined behavior if -another thread could hold locks). ---- - src/stdio/fflush.c | 53 +++++++++++++++++++++++------------------------------ - 1 file changed, 23 insertions(+), 30 deletions(-) - -diff --git a/src/stdio/fflush.c b/src/stdio/fflush.c -index 3f462c8..c288106 100644 ---- a/src/stdio/fflush.c -+++ b/src/stdio/fflush.c -@@ -1,11 +1,30 @@ - #include "stdio_impl.h" - --static int __fflush_unlocked(FILE *f) -+/* stdout.c will override this if linked */ -+static FILE *volatile dummy = 0; -+weak_alias(dummy, __stdout_used); -+ -+int fflush(FILE *f) - { -+ if (!f) { -+ int r = __stdout_used ? fflush(__stdout_used) : 0; -+ -+ for (f=*__ofl_lock(); f; f=f->next) -+ if (f->wpos > f->wbase) r |= fflush(f); -+ __ofl_unlock(); -+ -+ return r; -+ } -+ -+ FLOCK(f); -+ - /* If writing, flush output */ - if (f->wpos > f->wbase) { - f->write(f, 0, 0); -- if (!f->wpos) return EOF; -+ if (!f->wpos) { -+ FUNLOCK(f); -+ return EOF; -+ } - } - - /* If reading, sync position, per POSIX */ -@@ -15,34 +34,8 @@ static int __fflush_unlocked(FILE *f) - f->wpos = f->wbase = f->wend = 0; - f->rpos = f->rend = 0; - -+ FUNLOCK(f); - return 0; - } - --/* stdout.c will override this if linked */ --static FILE *volatile dummy = 0; --weak_alias(dummy, __stdout_used); -- --int fflush(FILE *f) --{ -- int r; -- -- if (f) { -- FLOCK(f); -- r = __fflush_unlocked(f); -- FUNLOCK(f); -- return r; -- } -- -- r = __stdout_used ? fflush(__stdout_used) : 0; -- -- for (f=*__ofl_lock(); f; f=f->next) { -- FLOCK(f); -- if (f->wpos > f->wbase) r |= __fflush_unlocked(f); -- FUNLOCK(f); -- } -- __ofl_unlock(); -- -- return r; --} -- --weak_alias(__fflush_unlocked, fflush_unlocked); -+weak_alias(fflush, fflush_unlocked); --- -2.10.1 - diff --git a/main/musl/0011-fix-undefined-behavior-in-sched.h-cpu_set_t-usage.patch b/main/musl/0011-fix-undefined-behavior-in-sched.h-cpu_set_t-usage.patch deleted file mode 100644 index 7295743ed0..0000000000 --- a/main/musl/0011-fix-undefined-behavior-in-sched.h-cpu_set_t-usage.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 66570ec9c465e3c6c5d6dbd7dd42e45041a39288 Mon Sep 17 00:00:00 2001 -From: Rich Felker <dalias@aerifal.cx> -Date: Mon, 19 Sep 2016 11:15:51 -0400 -Subject: [PATCH 11/11] fix undefined behavior in sched.h cpu_set_t usage - -since cpu sets can be dynamically allocated and have variable size, -accessing their contents via ->__bits is not valid; performing pointer -arithmetic outside the range of the size of the declared __bits array -results in undefined beahavior. instead, only use cpu_set_t for -fixed-size cpu set objects (instantiated by the caller) and as an -abstract pointer type for dynamically allocated ones. perform all -accesses simply by casting the abstract pointer type cpuset_t * back -to unsigned long *. ---- - include/sched.h | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/include/sched.h b/include/sched.h -index af82d6c..d1cccb7 100644 ---- a/include/sched.h -+++ b/include/sched.h -@@ -82,7 +82,7 @@ int sched_getaffinity(pid_t, size_t, cpu_set_t *); - int sched_setaffinity(pid_t, size_t, const cpu_set_t *); - - #define __CPU_op_S(i, size, set, op) ( (i)/8U >= (size) ? 0 : \ -- ((set)->__bits[(i)/8/sizeof(long)] op (1UL<<((i)%(8*sizeof(long))))) ) -+ (((unsigned long *)(set))[(i)/8/sizeof(long)] op (1UL<<((i)%(8*sizeof(long))))) ) - - #define CPU_SET_S(i, size, set) __CPU_op_S(i, size, set, |=) - #define CPU_CLR_S(i, size, set) __CPU_op_S(i, size, set, &=~) -@@ -94,8 +94,8 @@ static __inline void __CPU_##func##_S(size_t __size, cpu_set_t *__dest, \ - { \ - size_t __i; \ - for (__i=0; __i<__size/sizeof(long); __i++) \ -- __dest->__bits[__i] = __src1->__bits[__i] \ -- op __src2->__bits[__i] ; \ -+ ((unsigned long *)__dest)[__i] = ((unsigned long *)__src1)[__i] \ -+ op ((unsigned long *)__src2)[__i] ; \ - } - - __CPU_op_func_S(AND, &) --- -2.10.1 - diff --git a/main/musl/0012-fix-getservby-_r-result-pointer-value-on-error.patch b/main/musl/0012-fix-getservby-_r-result-pointer-value-on-error.patch deleted file mode 100644 index 4b258dbfdd..0000000000 --- a/main/musl/0012-fix-getservby-_r-result-pointer-value-on-error.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 8d7a3f40c8de414122eb8eb2131291782ee8ed15 Mon Sep 17 00:00:00 2001 -From: Daniel Sabogal <dsabogalcc@gmail.com> -Date: Fri, 23 Sep 2016 21:10:07 -0400 -Subject: [PATCH 12/18] fix getservby*_r result pointer value on error - -this is a clone of the fix to the gethostby*_r functions in -commit fe82bb9b921be34370e6b71a1c6f062c20999ae0. the man pages -document that the getservby*_r functions set this pointer to -NULL if there was an error or if no record was found. ---- - src/network/getservbyname_r.c | 2 ++ - src/network/getservbyport_r.c | 1 + - 2 files changed, 3 insertions(+) - -diff --git a/src/network/getservbyname_r.c b/src/network/getservbyname_r.c -index 056c2f3..ad3d616 100644 ---- a/src/network/getservbyname_r.c -+++ b/src/network/getservbyname_r.c -@@ -15,6 +15,8 @@ int getservbyname_r(const char *name, const char *prots, - struct service servs[MAXSERVS]; - int cnt, proto, align; - -+ *res = 0; -+ - /* Align buffer */ - align = -(uintptr_t)buf & ALIGN-1; - if (buflen < 2*sizeof(char *)+align) -diff --git a/src/network/getservbyport_r.c b/src/network/getservbyport_r.c -index a0a7cae..0ae0e41 100644 ---- a/src/network/getservbyport_r.c -+++ b/src/network/getservbyport_r.c -@@ -20,6 +20,7 @@ int getservbyport_r(int port, const char *prots, - if (r) r = getservbyport_r(port, "udp", se, buf, buflen, res); - return r; - } -+ *res = 0; - - /* Align buffer */ - i = (uintptr_t)buf & sizeof(char *)-1; --- -2.10.1 - diff --git a/main/musl/0013-fix-strftime-y-for-negative-tm_year.patch b/main/musl/0013-fix-strftime-y-for-negative-tm_year.patch deleted file mode 100644 index f8fbc635c1..0000000000 --- a/main/musl/0013-fix-strftime-y-for-negative-tm_year.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 583ea83541dcc6481c7a1bd1a9b485526bad84a1 Mon Sep 17 00:00:00 2001 -From: Szabolcs Nagy <nsz@port70.net> -Date: Tue, 4 Oct 2016 17:14:57 +0000 -Subject: [PATCH 13/18] fix strftime %y for negative tm_year - ---- - src/time/strftime.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/src/time/strftime.c b/src/time/strftime.c -index f1ccc4d..e103e02 100644 ---- a/src/time/strftime.c -+++ b/src/time/strftime.c -@@ -167,6 +167,7 @@ const char *__strftime_fmt_1(char (*s)[100], size_t *l, int f, const struct tm * - goto nl_strftime; - case 'y': - val = tm->tm_year % 100; -+ if (val<0) val += 100; - goto number; - case 'Y': - val = tm->tm_year + 1900LL; --- -2.10.1 - diff --git a/main/musl/0014-fix-missing-integer-overflow-checks-in-regexec-buffe.patch b/main/musl/0014-fix-missing-integer-overflow-checks-in-regexec-buffe.patch deleted file mode 100644 index b358278715..0000000000 --- a/main/musl/0014-fix-missing-integer-overflow-checks-in-regexec-buffe.patch +++ /dev/null @@ -1,73 +0,0 @@ -From c3edc06d1e1360f3570db9155d6b318ae0d0f0f7 Mon Sep 17 00:00:00 2001 -From: Rich Felker <dalias@aerifal.cx> -Date: Thu, 6 Oct 2016 18:34:58 -0400 -Subject: [PATCH 14/18] fix missing integer overflow checks in regexec buffer - size computations - -most of the possible overflows were already ruled out in practice by -regcomp having already succeeded performing larger allocations. -however at least the num_states*num_tags multiplication can clearly -overflow in practice. for safety, check them all, and use the proper -type, size_t, rather than int. - -also improve comments, use calloc in place of malloc+memset, and -remove bogus casts. ---- - src/regex/regexec.c | 23 ++++++++++++++++++----- - 1 file changed, 18 insertions(+), 5 deletions(-) - -diff --git a/src/regex/regexec.c b/src/regex/regexec.c -index 16c5d0a..dd52319 100644 ---- a/src/regex/regexec.c -+++ b/src/regex/regexec.c -@@ -34,6 +34,7 @@ - #include <wchar.h> - #include <wctype.h> - #include <limits.h> -+#include <stdint.h> - - #include <regex.h> - -@@ -206,11 +207,24 @@ tre_tnfa_run_parallel(const tre_tnfa_t *tnfa, const void *string, - - /* Allocate memory for temporary data required for matching. This needs to - be done for every matching operation to be thread safe. This allocates -- everything in a single large block from the stack frame using alloca() -- or with malloc() if alloca is unavailable. */ -+ everything in a single large block with calloc(). */ - { -- int tbytes, rbytes, pbytes, xbytes, total_bytes; -+ size_t tbytes, rbytes, pbytes, xbytes, total_bytes; - char *tmp_buf; -+ -+ /* Ensure that tbytes and xbytes*num_states cannot overflow, and that -+ * they don't contribute more than 1/8 of SIZE_MAX to total_bytes. */ -+ if (num_tags > SIZE_MAX/(8 * sizeof(int) * tnfa->num_states)) -+ goto error_exit; -+ -+ /* Likewise check rbytes. */ -+ if (tnfa->num_states+1 > SIZE_MAX/(8 * sizeof(*reach_next))) -+ goto error_exit; -+ -+ /* Likewise check pbytes. */ -+ if (tnfa->num_states > SIZE_MAX/(8 * sizeof(*reach_pos))) -+ goto error_exit; -+ - /* Compute the length of the block we need. */ - tbytes = sizeof(*tmp_tags) * num_tags; - rbytes = sizeof(*reach_next) * (tnfa->num_states + 1); -@@ -221,10 +235,9 @@ tre_tnfa_run_parallel(const tre_tnfa_t *tnfa, const void *string, - + (rbytes + xbytes * tnfa->num_states) * 2 + tbytes + pbytes; - - /* Allocate the memory. */ -- buf = xmalloc((unsigned)total_bytes); -+ buf = calloc(total_bytes, 1); - if (buf == NULL) - return REG_ESPACE; -- memset(buf, 0, (size_t)total_bytes); - - /* Get the various pointers within tmp_buf (properly aligned). */ - tmp_tags = (void *)buf; --- -2.10.1 - diff --git a/main/musl/0015-fix-regexec-with-haystack-strings-longer-than-INT_MA.patch b/main/musl/0015-fix-regexec-with-haystack-strings-longer-than-INT_MA.patch deleted file mode 100644 index e78fe0bd54..0000000000 --- a/main/musl/0015-fix-regexec-with-haystack-strings-longer-than-INT_MA.patch +++ /dev/null @@ -1,190 +0,0 @@ -From aee6abb2400b9a955c2b41166db1c22f63ad42ef Mon Sep 17 00:00:00 2001 -From: Rich Felker <dalias@aerifal.cx> -Date: Thu, 6 Oct 2016 12:15:47 -0400 -Subject: [PATCH 15/18] fix regexec with haystack strings longer than INT_MAX - -we inherited from TRE regexec code that's utterly wrong with respect -to the integer types it's using. while it doesn't appear that -compilers are producing unsafe output, signed integer overflows seem -to happen, and regexec fails to find matches past offset INT_MAX. - -this patch fixes the type of all variables/fields used to store -offsets in the string from int to regoff_t. after the changes, basic -testing showed that regexec can now find matches past 2GB (INT_MAX) -and past 4GB on x86_64, and code generation is unchanged on i386. ---- - src/regex/regexec.c | 54 +++++++++++++++++++++++++++-------------------------- - 1 file changed, 28 insertions(+), 26 deletions(-) - -diff --git a/src/regex/regexec.c b/src/regex/regexec.c -index dd52319..5c4cb92 100644 ---- a/src/regex/regexec.c -+++ b/src/regex/regexec.c -@@ -44,7 +44,7 @@ - - static void - tre_fill_pmatch(size_t nmatch, regmatch_t pmatch[], int cflags, -- const tre_tnfa_t *tnfa, int *tags, int match_eo); -+ const tre_tnfa_t *tnfa, regoff_t *tags, regoff_t match_eo); - - /*********************************************************************** - from tre-match-utils.h -@@ -97,7 +97,7 @@ tre_fill_pmatch(size_t nmatch, regmatch_t pmatch[], int cflags, - /* Returns 1 if `t1' wins `t2', 0 otherwise. */ - static int - tre_tag_order(int num_tags, tre_tag_direction_t *tag_directions, -- int *t1, int *t2) -+ regoff_t *t1, regoff_t *t2) - { - int i; - for (i = 0; i < num_tags; i++) -@@ -157,25 +157,25 @@ tre_neg_char_classes_match(tre_ctype_t *classes, tre_cint_t wc, int icase) - - typedef struct { - tre_tnfa_transition_t *state; -- int *tags; -+ regoff_t *tags; - } tre_tnfa_reach_t; - - typedef struct { -- int pos; -- int **tags; -+ regoff_t pos; -+ regoff_t **tags; - } tre_reach_pos_t; - - - static reg_errcode_t - tre_tnfa_run_parallel(const tre_tnfa_t *tnfa, const void *string, -- int *match_tags, int eflags, -- int *match_end_ofs) -+ regoff_t *match_tags, int eflags, -+ regoff_t *match_end_ofs) - { - /* State variables required by GET_NEXT_WCHAR. */ - tre_char_t prev_c = 0, next_c = 0; - const char *str_byte = string; -- int pos = -1; -- int pos_add_next = 1; -+ regoff_t pos = -1; -+ regoff_t pos_add_next = 1; - #ifdef TRE_MBSTATE - mbstate_t mbstate; - #endif /* TRE_MBSTATE */ -@@ -191,10 +191,10 @@ tre_tnfa_run_parallel(const tre_tnfa_t *tnfa, const void *string, - int *tag_i; - int num_tags, i; - -- int match_eo = -1; /* end offset of match (-1 if no match found yet) */ -+ regoff_t match_eo = -1; /* end offset of match (-1 if no match found yet) */ - int new_match = 0; -- int *tmp_tags = NULL; -- int *tmp_iptr; -+ regoff_t *tmp_tags = NULL; -+ regoff_t *tmp_iptr; - - #ifdef TRE_MBSTATE - memset(&mbstate, '\0', sizeof(mbstate)); -@@ -214,7 +214,7 @@ tre_tnfa_run_parallel(const tre_tnfa_t *tnfa, const void *string, - - /* Ensure that tbytes and xbytes*num_states cannot overflow, and that - * they don't contribute more than 1/8 of SIZE_MAX to total_bytes. */ -- if (num_tags > SIZE_MAX/(8 * sizeof(int) * tnfa->num_states)) -+ if (num_tags > SIZE_MAX/(8 * sizeof(regoff_t) * tnfa->num_states)) - goto error_exit; - - /* Likewise check rbytes. */ -@@ -229,7 +229,7 @@ tre_tnfa_run_parallel(const tre_tnfa_t *tnfa, const void *string, - tbytes = sizeof(*tmp_tags) * num_tags; - rbytes = sizeof(*reach_next) * (tnfa->num_states + 1); - pbytes = sizeof(*reach_pos) * tnfa->num_states; -- xbytes = sizeof(int) * num_tags; -+ xbytes = sizeof(regoff_t) * num_tags; - total_bytes = - (sizeof(long) - 1) * 4 /* for alignment paddings */ - + (rbytes + xbytes * tnfa->num_states) * 2 + tbytes + pbytes; -@@ -490,12 +490,12 @@ error_exit: - */ - - typedef struct { -- int pos; -+ regoff_t pos; - const char *str_byte; - tre_tnfa_transition_t *state; - int state_id; - int next_c; -- int *tags; -+ regoff_t *tags; - #ifdef TRE_MBSTATE - mbstate_t mbstate; - #endif /* TRE_MBSTATE */ -@@ -591,13 +591,13 @@ typedef struct tre_backtrack_struct { - - static reg_errcode_t - tre_tnfa_run_backtrack(const tre_tnfa_t *tnfa, const void *string, -- int *match_tags, int eflags, int *match_end_ofs) -+ regoff_t *match_tags, int eflags, regoff_t *match_end_ofs) - { - /* State variables required by GET_NEXT_WCHAR. */ - tre_char_t prev_c = 0, next_c = 0; - const char *str_byte = string; -- int pos = 0; -- int pos_add_next = 1; -+ regoff_t pos = 0; -+ regoff_t pos_add_next = 1; - #ifdef TRE_MBSTATE - mbstate_t mbstate; - #endif /* TRE_MBSTATE */ -@@ -610,15 +610,16 @@ tre_tnfa_run_backtrack(const tre_tnfa_t *tnfa, const void *string, - started from. */ - int next_c_start; - const char *str_byte_start; -- int pos_start = -1; -+ regoff_t pos_start = -1; - #ifdef TRE_MBSTATE - mbstate_t mbstate_start; - #endif /* TRE_MBSTATE */ - - /* End offset of best match so far, or -1 if no match found yet. */ -- int match_eo = -1; -+ regoff_t match_eo = -1; - /* Tag arrays. */ -- int *next_tags, *tags = NULL; -+ int *next_tags; -+ regoff_t *tags = NULL; - /* Current TNFA state. */ - tre_tnfa_transition_t *state; - int *states_seen = NULL; -@@ -768,8 +769,9 @@ tre_tnfa_run_backtrack(const tre_tnfa_t *tnfa, const void *string, - /* This is a back reference state. All transitions leaving from - this state have the same back reference "assertion". Instead - of reading the next character, we match the back reference. */ -- int so, eo, bt = trans_i->u.backref; -- int bt_len; -+ regoff_t so, eo; -+ int bt = trans_i->u.backref; -+ regoff_t bt_len; - int result; - - /* Get the substring we need to match against. Remember to -@@ -926,7 +928,7 @@ tre_tnfa_run_backtrack(const tre_tnfa_t *tnfa, const void *string, - endpoint values. */ - static void - tre_fill_pmatch(size_t nmatch, regmatch_t pmatch[], int cflags, -- const tre_tnfa_t *tnfa, int *tags, int match_eo) -+ const tre_tnfa_t *tnfa, regoff_t *tags, regoff_t match_eo) - { - tre_submatch_data_t *submatch_data; - unsigned int i, j; -@@ -996,7 +998,7 @@ regexec(const regex_t *restrict preg, const char *restrict string, - { - tre_tnfa_t *tnfa = (void *)preg->TRE_REGEX_T_FIELD; - reg_errcode_t status; -- int *tags = NULL, eo; -+ regoff_t *tags = NULL, eo; - if (tnfa->cflags & REG_NOSUB) nmatch = 0; - if (tnfa->num_tags > 0 && nmatch > 0) - { --- -2.10.1 - diff --git a/main/musl/0016-fix-integer-overflow-in-float-printf-needed-precisio.patch b/main/musl/0016-fix-integer-overflow-in-float-printf-needed-precisio.patch deleted file mode 100644 index fcadc040d2..0000000000 --- a/main/musl/0016-fix-integer-overflow-in-float-printf-needed-precisio.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 70d2687d85c314963cf280759b23fd4573ff0d82 Mon Sep 17 00:00:00 2001 -From: Rich Felker <dalias@aerifal.cx> -Date: Wed, 19 Oct 2016 20:17:16 -0400 -Subject: [PATCH 16/18] fix integer overflow in float printf needed-precision - computation - -if the requested precision is close to INT_MAX, adding -LDBL_MANT_DIG/3+8 overflows. in practice the resulting undefined -behavior manifests as a large negative result, which is then used to -compute the new end pointer (z) with a wildly out-of-bounds value -(more overflow, more undefined behavior). the end result is at least -incorrect output and character count (return value); worse things do -not seem to happen, but detailed analysis has not been done. - -this patch fixes the overflow by performing the intermediate -computation as unsigned; after division by 9, the final result -necessarily fits in int. ---- - src/stdio/vfprintf.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/stdio/vfprintf.c b/src/stdio/vfprintf.c -index e439a07..cd17ad7 100644 ---- a/src/stdio/vfprintf.c -+++ b/src/stdio/vfprintf.c -@@ -312,7 +312,7 @@ static int fmt_fp(FILE *f, long double y, int w, int p, int fl, int t) - } - while (e2<0) { - uint32_t carry=0, *b; -- int sh=MIN(9,-e2), need=1+(p+LDBL_MANT_DIG/3+8)/9; -+ int sh=MIN(9,-e2), need=1+(p+LDBL_MANT_DIG/3U+8)/9; - for (d=a; d<z; d++) { - uint32_t rm = *d & (1<<sh)-1; - *d = (*d>>sh) + carry; --- -2.10.1 - diff --git a/main/musl/0017-fix-integer-overflows-and-uncaught-EOVERFLOW-in-prin.patch b/main/musl/0017-fix-integer-overflows-and-uncaught-EOVERFLOW-in-prin.patch deleted file mode 100644 index c8fb63f1d1..0000000000 --- a/main/musl/0017-fix-integer-overflows-and-uncaught-EOVERFLOW-in-prin.patch +++ /dev/null @@ -1,392 +0,0 @@ -From 167dfe9672c116b315e72e57a55c7769f180dffa Mon Sep 17 00:00:00 2001 -From: Rich Felker <dalias@aerifal.cx> -Date: Thu, 20 Oct 2016 00:22:09 -0400 -Subject: [PATCH 17/18] fix integer overflows and uncaught EOVERFLOW in printf - core - -this patch fixes a large number of missed internal signed-overflow -checks and errors in determining when the return value (output length) -would exceed INT_MAX, which should result in EOVERFLOW. some of the -issues fixed were reported by Alexander Cherepanov; others were found -in subsequent review of the code. - -aside from the signed overflows being undefined behavior, the -following specific bugs were found to exist in practice: - -- overflows computing length of floating point formats with huge - explicit precisions, integer formats with prefix characters and huge - explicit precisions, or string arguments or format strings longer - than INT_MAX, resulted in wrong return value and wrong %n results. - -- literal width and precision values outside the range of int were - misinterpreted, yielding wrong behavior in at least one well-defined - case: string formats with precision greater than INT_MAX were - sometimes truncated. - -- in cases where EOVERFLOW is produced, incorrect values could be - written for %n specifiers past the point of exceeding INT_MAX. - -in addition to fixing these bugs, we now stop producing output -immediately when output length would exceed INT_MAX, rather than -continuing and returning an error only at the end. ---- - src/stdio/vfprintf.c | 72 +++++++++++++++++++++++++++++++++++---------------- - src/stdio/vfwprintf.c | 63 +++++++++++++++++++++++++++----------------- - 2 files changed, 89 insertions(+), 46 deletions(-) - -diff --git a/src/stdio/vfprintf.c b/src/stdio/vfprintf.c -index cd17ad7..e2ab2dc 100644 ---- a/src/stdio/vfprintf.c -+++ b/src/stdio/vfprintf.c -@@ -272,6 +272,8 @@ static int fmt_fp(FILE *f, long double y, int w, int p, int fl, int t) - if (s-buf==1 && (y||p>0||(fl&ALT_FORM))) *s++='.'; - } while (y); - -+ if (p > INT_MAX-2-(ebuf-estr)-pl) -+ return -1; - if (p && s-buf-2 < p) - l = (p+2) + (ebuf-estr); - else -@@ -383,17 +385,22 @@ static int fmt_fp(FILE *f, long double y, int w, int p, int fl, int t) - p = MIN(p,MAX(0,9*(z-r-1)+e-j)); - } - } -+ if (p > INT_MAX-1-(p || (fl&ALT_FORM))) -+ return -1; - l = 1 + p + (p || (fl&ALT_FORM)); - if ((t|32)=='f') { -+ if (e > INT_MAX-l) return -1; - if (e>0) l+=e; - } else { - estr=fmt_u(e<0 ? -e : e, ebuf); - while(ebuf-estr<2) *--estr='0'; - *--estr = (e<0 ? '-' : '+'); - *--estr = t; -+ if (ebuf-estr > INT_MAX-l) return -1; - l += ebuf-estr; - } - -+ if (l > INT_MAX-pl) return -1; - pad(f, ' ', w, pl+l, fl); - out(f, prefix, pl); - pad(f, '0', w, pl+l, fl^ZERO_PAD); -@@ -437,8 +444,10 @@ static int fmt_fp(FILE *f, long double y, int w, int p, int fl, int t) - - static int getint(char **s) { - int i; -- for (i=0; isdigit(**s); (*s)++) -- i = 10*i + (**s-'0'); -+ for (i=0; isdigit(**s); (*s)++) { -+ if (i > INT_MAX/10U || **s-'0' > INT_MAX-10*i) i = -1; -+ else i = 10*i + (**s-'0'); -+ } - return i; - } - -@@ -446,12 +455,12 @@ static int printf_core(FILE *f, const char *fmt, va_list *ap, union arg *nl_arg, - { - char *a, *z, *s=(char *)fmt; - unsigned l10n=0, fl; -- int w, p; -+ int w, p, xp; - union arg arg; - int argpos; - unsigned st, ps; - int cnt=0, l=0; -- int i; -+ size_t i; - char buf[sizeof(uintmax_t)*3+3+LDBL_MANT_DIG/4]; - const char *prefix; - int t, pl; -@@ -459,18 +468,19 @@ static int printf_core(FILE *f, const char *fmt, va_list *ap, union arg *nl_arg, - char mb[4]; - - for (;;) { -+ /* This error is only specified for snprintf, but since it's -+ * unspecified for other forms, do the same. Stop immediately -+ * on overflow; otherwise %n could produce wrong results. */ -+ if (l > INT_MAX - cnt) goto overflow; -+ - /* Update output count, end loop when fmt is exhausted */ -- if (cnt >= 0) { -- if (l > INT_MAX - cnt) { -- errno = EOVERFLOW; -- cnt = -1; -- } else cnt += l; -- } -+ cnt += l; - if (!*s) break; - - /* Handle literal text and %% format specifiers */ - for (a=s; *s && *s!='%'; s++); - for (z=s; s[0]=='%' && s[1]=='%'; z++, s+=2); -+ if (z-a > INT_MAX-cnt) goto overflow; - l = z-a; - if (f) out(f, a, l); - if (l) continue; -@@ -498,9 +508,9 @@ static int printf_core(FILE *f, const char *fmt, va_list *ap, union arg *nl_arg, - } else if (!l10n) { - w = f ? va_arg(*ap, int) : 0; - s++; -- } else return -1; -+ } else goto inval; - if (w<0) fl|=LEFT_ADJ, w=-w; -- } else if ((w=getint(&s))<0) return -1; -+ } else if ((w=getint(&s))<0) goto overflow; - - /* Read precision */ - if (*s=='.' && s[1]=='*') { -@@ -511,24 +521,29 @@ static int printf_core(FILE *f, const char *fmt, va_list *ap, union arg *nl_arg, - } else if (!l10n) { - p = f ? va_arg(*ap, int) : 0; - s+=2; -- } else return -1; -+ } else goto inval; -+ xp = (p>=0); - } else if (*s=='.') { - s++; - p = getint(&s); -- } else p = -1; -+ xp = 1; -+ } else { -+ p = -1; -+ xp = 0; -+ } - - /* Format specifier state machine */ - st=0; - do { -- if (OOB(*s)) return -1; -+ if (OOB(*s)) goto inval; - ps=st; - st=states[st]S(*s++); - } while (st-1<STOP); -- if (!st) return -1; -+ if (!st) goto inval; - - /* Check validity of argument type (nl/normal) */ - if (st==NOARG) { -- if (argpos>=0) return -1; -+ if (argpos>=0) goto inval; - } else { - if (argpos>=0) nl_type[argpos]=st, arg=nl_arg[argpos]; - else if (f) pop_arg(&arg, st, ap); -@@ -584,6 +599,7 @@ static int printf_core(FILE *f, const char *fmt, va_list *ap, union arg *nl_arg, - case 'u': - a = fmt_u(arg.i, z); - } -+ if (xp && p<0) goto overflow; - if (p>=0) fl &= ~ZERO_PAD; - if (!arg.i && !p) { - a=z; -@@ -599,9 +615,9 @@ static int printf_core(FILE *f, const char *fmt, va_list *ap, union arg *nl_arg, - if (1) a = strerror(errno); else - case 's': - a = arg.p ? arg.p : "(null)"; -- z = memchr(a, 0, p); -- if (!z) z=a+p; -- else p=z-a; -+ z = a + strnlen(a, p<0 ? INT_MAX : p); -+ if (p<0 && *z) goto overflow; -+ p = z-a; - fl &= ~ZERO_PAD; - break; - case 'C': -@@ -611,8 +627,9 @@ static int printf_core(FILE *f, const char *fmt, va_list *ap, union arg *nl_arg, - p = -1; - case 'S': - ws = arg.p; -- for (i=l=0; i<0U+p && *ws && (l=wctomb(mb, *ws++))>=0 && l<=0U+p-i; i+=l); -+ for (i=l=0; i<p && *ws && (l=wctomb(mb, *ws++))>=0 && l<=p-i; i+=l); - if (l<0) return -1; -+ if (i > INT_MAX) goto overflow; - p = i; - pad(f, ' ', w, p, fl); - ws = arg.p; -@@ -623,12 +640,16 @@ static int printf_core(FILE *f, const char *fmt, va_list *ap, union arg *nl_arg, - continue; - case 'e': case 'f': case 'g': case 'a': - case 'E': case 'F': case 'G': case 'A': -+ if (xp && p<0) goto overflow; - l = fmt_fp(f, arg.f, w, p, fl, t); -+ if (l<0) goto overflow; - continue; - } - - if (p < z-a) p = z-a; -+ if (p > INT_MAX-pl) goto overflow; - if (w < pl+p) w = pl+p; -+ if (w > INT_MAX-cnt) goto overflow; - - pad(f, ' ', w, pl+p, fl); - out(f, prefix, pl); -@@ -646,8 +667,15 @@ static int printf_core(FILE *f, const char *fmt, va_list *ap, union arg *nl_arg, - for (i=1; i<=NL_ARGMAX && nl_type[i]; i++) - pop_arg(nl_arg+i, nl_type[i], ap); - for (; i<=NL_ARGMAX && !nl_type[i]; i++); -- if (i<=NL_ARGMAX) return -1; -+ if (i<=NL_ARGMAX) goto inval; - return 1; -+ -+inval: -+ errno = EINVAL; -+ return -1; -+overflow: -+ errno = EOVERFLOW; -+ return -1; - } - - int vfprintf(FILE *restrict f, const char *restrict fmt, va_list ap) -diff --git a/src/stdio/vfwprintf.c b/src/stdio/vfwprintf.c -index f9f1ecf..b8fff20 100644 ---- a/src/stdio/vfwprintf.c -+++ b/src/stdio/vfwprintf.c -@@ -154,8 +154,10 @@ static void out(FILE *f, const wchar_t *s, size_t l) - - static int getint(wchar_t **s) { - int i; -- for (i=0; iswdigit(**s); (*s)++) -- i = 10*i + (**s-'0'); -+ for (i=0; iswdigit(**s); (*s)++) { -+ if (i > INT_MAX/10U || **s-'0' > INT_MAX-10*i) i = -1; -+ else i = 10*i + (**s-'0'); -+ } - return i; - } - -@@ -168,8 +170,8 @@ static const char sizeprefix['y'-'a'] = { - static int wprintf_core(FILE *f, const wchar_t *fmt, va_list *ap, union arg *nl_arg, int *nl_type) - { - wchar_t *a, *z, *s=(wchar_t *)fmt; -- unsigned l10n=0, litpct, fl; -- int w, p; -+ unsigned l10n=0, fl; -+ int w, p, xp; - union arg arg; - int argpos; - unsigned st, ps; -@@ -181,20 +183,19 @@ static int wprintf_core(FILE *f, const wchar_t *fmt, va_list *ap, union arg *nl_ - wchar_t wc; - - for (;;) { -+ /* This error is only specified for snprintf, but since it's -+ * unspecified for other forms, do the same. Stop immediately -+ * on overflow; otherwise %n could produce wrong results. */ -+ if (l > INT_MAX - cnt) goto overflow; -+ - /* Update output count, end loop when fmt is exhausted */ -- if (cnt >= 0) { -- if (l > INT_MAX - cnt) { -- if (!ferror(f)) errno = EOVERFLOW; -- cnt = -1; -- } else cnt += l; -- } -+ cnt += l; - if (!*s) break; - - /* Handle literal text and %% format specifiers */ - for (a=s; *s && *s!='%'; s++); -- litpct = wcsspn(s, L"%")/2; /* Optimize %%%% runs */ -- z = s+litpct; -- s += 2*litpct; -+ for (z=s; s[0]=='%' && s[1]=='%'; z++, s+=2); -+ if (z-a > INT_MAX-cnt) goto overflow; - l = z-a; - if (f) out(f, a, l); - if (l) continue; -@@ -222,9 +223,9 @@ static int wprintf_core(FILE *f, const wchar_t *fmt, va_list *ap, union arg *nl_ - } else if (!l10n) { - w = f ? va_arg(*ap, int) : 0; - s++; -- } else return -1; -+ } else goto inval; - if (w<0) fl|=LEFT_ADJ, w=-w; -- } else if ((w=getint(&s))<0) return -1; -+ } else if ((w=getint(&s))<0) goto overflow; - - /* Read precision */ - if (*s=='.' && s[1]=='*') { -@@ -235,24 +236,29 @@ static int wprintf_core(FILE *f, const wchar_t *fmt, va_list *ap, union arg *nl_ - } else if (!l10n) { - p = f ? va_arg(*ap, int) : 0; - s+=2; -- } else return -1; -+ } else goto inval; -+ xp = (p>=0); - } else if (*s=='.') { - s++; - p = getint(&s); -- } else p = -1; -+ xp = 1; -+ } else { -+ p = -1; -+ xp = 0; -+ } - - /* Format specifier state machine */ - st=0; - do { -- if (OOB(*s)) return -1; -+ if (OOB(*s)) goto inval; - ps=st; - st=states[st]S(*s++); - } while (st-1<STOP); -- if (!st) return -1; -+ if (!st) goto inval; - - /* Check validity of argument type (nl/normal) */ - if (st==NOARG) { -- if (argpos>=0) return -1; -+ if (argpos>=0) goto inval; - } else { - if (argpos>=0) nl_type[argpos]=st, arg=nl_arg[argpos]; - else if (f) pop_arg(&arg, st, ap); -@@ -285,8 +291,9 @@ static int wprintf_core(FILE *f, const wchar_t *fmt, va_list *ap, union arg *nl_ - continue; - case 'S': - a = arg.p; -- z = wmemchr(a, 0, p); -- if (z) p=z-a; -+ z = a + wcsnlen(a, p<0 ? INT_MAX : p); -+ if (p<0 && *z) goto overflow; -+ p = z-a; - if (w<p) w=p; - if (!(fl&LEFT_ADJ)) fprintf(f, "%*s", w-p, ""); - out(f, a, p); -@@ -298,9 +305,9 @@ static int wprintf_core(FILE *f, const wchar_t *fmt, va_list *ap, union arg *nl_ - case 's': - if (!arg.p) arg.p = "(null)"; - bs = arg.p; -- if (p<0) p = INT_MAX; -- for (i=l=0; l<p && (i=mbtowc(&wc, bs, MB_LEN_MAX))>0; bs+=i, l++); -+ for (i=l=0; l<(p<0?INT_MAX:p) && (i=mbtowc(&wc, bs, MB_LEN_MAX))>0; bs+=i, l++); - if (i<0) return -1; -+ if (p<0 && *bs) goto overflow; - p=l; - if (w<p) w=p; - if (!(fl&LEFT_ADJ)) fprintf(f, "%*s", w-p, ""); -@@ -315,6 +322,7 @@ static int wprintf_core(FILE *f, const wchar_t *fmt, va_list *ap, union arg *nl_ - continue; - } - -+ if (xp && p<0) goto overflow; - snprintf(charfmt, sizeof charfmt, "%%%s%s%s%s%s*.*%c%c", - "#"+!(fl & ALT_FORM), - "+"+!(fl & MARK_POS), -@@ -341,6 +349,13 @@ static int wprintf_core(FILE *f, const wchar_t *fmt, va_list *ap, union arg *nl_ - for (; i<=NL_ARGMAX && !nl_type[i]; i++); - if (i<=NL_ARGMAX) return -1; - return 1; -+ -+inval: -+ errno = EINVAL; -+ return -1; -+overflow: -+ errno = EOVERFLOW; -+ return -1; - } - - int vfwprintf(FILE *restrict f, const wchar_t *restrict fmt, va_list ap) --- -2.10.1 - diff --git a/main/musl/0018-fix-clock_nanosleep-error-case.patch b/main/musl/0018-fix-clock_nanosleep-error-case.patch deleted file mode 100644 index eaa61c9f8d..0000000000 --- a/main/musl/0018-fix-clock_nanosleep-error-case.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 3ca2d2d4aef910663785fe232d7d2127a22d8a84 Mon Sep 17 00:00:00 2001 -From: Daniel Sabogal <dsabogalcc@gmail.com> -Date: Sat, 17 Sep 2016 12:05:45 -0400 -Subject: [PATCH 18/25] fix clock_nanosleep error case - -posix requires that EINVAL be returned if the first parameter specifies -the cpu-time clock of the calling thread (CLOCK_THREAD_CPUTIME_ID). -linux returns ENOTSUP instead so we handle this. ---- - src/time/clock_nanosleep.c | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/src/time/clock_nanosleep.c b/src/time/clock_nanosleep.c -index ec87b9e..9e4d9f1 100644 ---- a/src/time/clock_nanosleep.c -+++ b/src/time/clock_nanosleep.c -@@ -1,8 +1,10 @@ - #include <time.h> -+#include <errno.h> - #include "syscall.h" - #include "libc.h" - - int clock_nanosleep(clockid_t clk, int flags, const struct timespec *req, struct timespec *rem) - { -- return -__syscall_cp(SYS_clock_nanosleep, clk, flags, req, rem); -+ int r = -__syscall_cp(SYS_clock_nanosleep, clk, flags, req, rem); -+ return clk == CLOCK_THREAD_CPUTIME_ID ? EINVAL : r; - } --- -2.10.1 - diff --git a/main/musl/0018-use-dynamic-buffer-for-getmntent.patch b/main/musl/0018-use-dynamic-buffer-for-getmntent.patch deleted file mode 100644 index 7178a00a4a..0000000000 --- a/main/musl/0018-use-dynamic-buffer-for-getmntent.patch +++ /dev/null @@ -1,67 +0,0 @@ -From 05973dc3bbc1aca9b3c8347de6879ed72147ab3b Mon Sep 17 00:00:00 2001 -From: Natanael Copa <ncopa@alpinelinux.org> -Date: Thu, 8 Sep 2016 19:07:31 +0200 -Subject: [PATCH 18/18] use dynamic buffer for getmntent - -overlayfs may have fairly long lines so we use getline to allocate a -buffer dynamically. The buffer will be allocated on first use, expand as -needed, but will never be free'ed. - -Downstream bug: http://bugs.alpinelinux.org/issues/5703 - -Signed-off-by: Natanael Copa <ncopa@alpinelinux.org> ---- - src/misc/mntent.c | 17 +++++++++++++---- - 1 file changed, 13 insertions(+), 4 deletions(-) - -diff --git a/src/misc/mntent.c b/src/misc/mntent.c -index a16d652..eabb820 100644 ---- a/src/misc/mntent.c -+++ b/src/misc/mntent.c -@@ -3,6 +3,11 @@ - #include <mntent.h> - #include <errno.h> - -+static char *internal_buf; -+static size_t internal_bufsize; -+ -+#define SENTINEL (char *)&internal_buf -+ - FILE *setmntent(const char *name, const char *mode) - { - return fopen(name, mode); -@@ -16,13 +21,18 @@ int endmntent(FILE *f) - - struct mntent *getmntent_r(FILE *f, struct mntent *mnt, char *linebuf, int buflen) - { -- int cnt, n[8]; -+ int cnt, n[8], use_internal = (linebuf == SENTINEL); - - mnt->mnt_freq = 0; - mnt->mnt_passno = 0; - - do { -- fgets(linebuf, buflen, f); -+ if (use_internal) { -+ getline(&internal_buf, &internal_bufsize, f); -+ linebuf = internal_buf; -+ } else { -+ fgets(linebuf, buflen, f); -+ } - if (feof(f) || ferror(f)) return 0; - if (!strchr(linebuf, '\n')) { - fscanf(f, "%*[^\n]%*[\n]"); -@@ -49,9 +59,8 @@ struct mntent *getmntent_r(FILE *f, struct mntent *mnt, char *linebuf, int bufle - - struct mntent *getmntent(FILE *f) - { -- static char linebuf[256]; - static struct mntent mnt; -- return getmntent_r(f, &mnt, linebuf, sizeof linebuf); -+ return getmntent_r(f, &mnt, SENTINEL, 0); - } - - int addmntent(FILE *f, const struct mntent *mnt) --- -2.10.1 - diff --git a/main/musl/0019-add-pthread_setname_np.patch b/main/musl/0019-add-pthread_setname_np.patch deleted file mode 100644 index 1f02497dd3..0000000000 --- a/main/musl/0019-add-pthread_setname_np.patch +++ /dev/null @@ -1,59 +0,0 @@ -From 8fb28b0b3e7a5e958fb844722a4b2ef9bc244af1 Mon Sep 17 00:00:00 2001 -From: Felix Janda <felix.janda@posteo.de> -Date: Fri, 16 Sep 2016 20:54:00 -0400 -Subject: [PATCH 19/25] add pthread_setname_np - -the thread name is displayed by gdb's "info threads". ---- - include/pthread.h | 1 + - src/thread/pthread_setname_np.c | 26 ++++++++++++++++++++++++++ - 2 files changed, 27 insertions(+) - create mode 100644 src/thread/pthread_setname_np.c - -diff --git a/include/pthread.h b/include/pthread.h -index 3d2e0c4..94ef919 100644 ---- a/include/pthread.h -+++ b/include/pthread.h -@@ -214,6 +214,7 @@ struct cpu_set_t; - int pthread_getaffinity_np(pthread_t, size_t, struct cpu_set_t *); - int pthread_setaffinity_np(pthread_t, size_t, const struct cpu_set_t *); - int pthread_getattr_np(pthread_t, pthread_attr_t *); -+int pthread_setname_np(pthread_t, const char *); - int pthread_tryjoin_np(pthread_t, void **); - int pthread_timedjoin_np(pthread_t, void **, const struct timespec *); - #endif -diff --git a/src/thread/pthread_setname_np.c b/src/thread/pthread_setname_np.c -new file mode 100644 -index 0000000..82d35e1 ---- /dev/null -+++ b/src/thread/pthread_setname_np.c -@@ -0,0 +1,26 @@ -+#define _GNU_SOURCE -+#include <fcntl.h> -+#include <string.h> -+#include <unistd.h> -+#include <sys/prctl.h> -+ -+#include "pthread_impl.h" -+ -+int pthread_setname_np(pthread_t thread, const char *name) -+{ -+ int fd, cs, status = 0; -+ char f[sizeof "/proc/self/task//comm" + 3*sizeof(int)]; -+ size_t len; -+ -+ if ((len = strnlen(name, 16)) > 15) return ERANGE; -+ -+ if (thread == pthread_self()) -+ return prctl(PR_SET_NAME, (unsigned long)name, 0UL, 0UL, 0UL) ? errno : 0; -+ -+ snprintf(f, sizeof f, "/proc/self/task/%d/comm", thread->tid); -+ pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &cs); -+ if ((fd = open(f, O_WRONLY)) < 0 || write(fd, name, len) < 0) status = errno; -+ if (fd >= 0) close(fd); -+ pthread_setcancelstate(cs, 0); -+ return status; -+} --- -2.10.1 - diff --git a/main/musl/0020-fix-float-formatting-of-some-exact-halfway-cases.patch b/main/musl/0020-fix-float-formatting-of-some-exact-halfway-cases.patch deleted file mode 100644 index 1e7284e622..0000000000 --- a/main/musl/0020-fix-float-formatting-of-some-exact-halfway-cases.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 51ab6db4ed115d079d7131975e4adb074ba9ef9d Mon Sep 17 00:00:00 2001 -From: Szabolcs Nagy <nsz@port70.net> -Date: Wed, 12 Oct 2016 00:49:59 +0200 -Subject: [PATCH 20/25] fix float formatting of some exact halfway cases - -in nearest rounding mode exact halfway cases were not following the -round to even rule if the rounding happened at a base 1000000000 digit -boundary of the internal representation and the previous digit was odd. - -e.g. printf("%.0f", 1.5) printed 1 instead of 2. ---- - src/stdio/vfprintf.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/src/stdio/vfprintf.c b/src/stdio/vfprintf.c -index e2ab2dc..60da14d 100644 ---- a/src/stdio/vfprintf.c -+++ b/src/stdio/vfprintf.c -@@ -345,7 +345,8 @@ static int fmt_fp(FILE *f, long double y, int w, int p, int fl, int t) - if (x || d+1!=z) { - long double round = 2/LDBL_EPSILON; - long double small; -- if (*d/i & 1) round += 2; -+ if ((*d/i & 1) || (i==1000000000 && d>a && (d[-1]&1))) -+ round += 2; - if (x<i/2) small=0x0.8p0; - else if (x==i/2 && d+1==z) small=0x1.0p0; - else small=0x1.8p0; --- -2.10.1 - diff --git a/main/musl/0021-fix-getopt_long_only-misinterpreting-as-an-option.patch b/main/musl/0021-fix-getopt_long_only-misinterpreting-as-an-option.patch deleted file mode 100644 index bba3186cac..0000000000 --- a/main/musl/0021-fix-getopt_long_only-misinterpreting-as-an-option.patch +++ /dev/null @@ -1,25 +0,0 @@ -From b24f1d2520c87077cef21e085893e5f3c565a6df Mon Sep 17 00:00:00 2001 -From: Rich Felker <dalias@aerifal.cx> -Date: Thu, 20 Oct 2016 12:13:33 -0400 -Subject: [PATCH 21/25] fix getopt_long_only misinterpreting "--" as an option - ---- - src/misc/getopt_long.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/misc/getopt_long.c b/src/misc/getopt_long.c -index 480c001..c6e1462 100644 ---- a/src/misc/getopt_long.c -+++ b/src/misc/getopt_long.c -@@ -53,7 +53,7 @@ static int __getopt_long_core(int argc, char *const *argv, const char *optstring - { - optarg = 0; - if (longopts && argv[optind][0] == '-' && -- ((longonly && argv[optind][1]) || -+ ((longonly && argv[optind][1] && argv[optind][1] != '-') || - (argv[optind][1] == '-' && argv[optind][2]))) - { - int colon = optstring[optstring[0]=='+'||optstring[0]=='-']==':'; --- -2.10.1 - diff --git a/main/musl/0022-fix-gratuitous-undefined-behavior-in-strptime.patch b/main/musl/0022-fix-gratuitous-undefined-behavior-in-strptime.patch deleted file mode 100644 index 6da625dd76..0000000000 --- a/main/musl/0022-fix-gratuitous-undefined-behavior-in-strptime.patch +++ /dev/null @@ -1,34 +0,0 @@ -From f33b17585058381491e6fda08f491b8e48c7980c Mon Sep 17 00:00:00 2001 -From: Rich Felker <dalias@aerifal.cx> -Date: Thu, 20 Oct 2016 13:22:20 -0400 -Subject: [PATCH 22/25] fix gratuitous undefined behavior in strptime - -accessing an object of type const char *restrict as if it had type -char * is not defined. ---- - src/time/strptime.c | 9 +++++++-- - 1 file changed, 7 insertions(+), 2 deletions(-) - -diff --git a/src/time/strptime.c b/src/time/strptime.c -index f41f55f..55c7ed1 100644 ---- a/src/time/strptime.c -+++ b/src/time/strptime.c -@@ -22,8 +22,13 @@ char *strptime(const char *restrict s, const char *restrict f, struct tm *restri - } - f++; - if (*f == '+') f++; -- if (isdigit(*f)) w=strtoul(f, (void *)&f, 10); -- else w=-1; -+ if (isdigit(*f)) { -+ char *new_f; -+ w=strtoul(f, &new_f, 10); -+ f = new_f; -+ } else { -+ w=-1; -+ } - adj=0; - switch (*f++) { - case 'a': case 'A': --- -2.10.1 - diff --git a/main/musl/0023-fix-strtod-and-strtof-rounding-with-many-trailing-ze.patch b/main/musl/0023-fix-strtod-and-strtof-rounding-with-many-trailing-ze.patch deleted file mode 100644 index f81bc76940..0000000000 --- a/main/musl/0023-fix-strtod-and-strtof-rounding-with-many-trailing-ze.patch +++ /dev/null @@ -1,37 +0,0 @@ -From d184a09e0529f33d8ddddb8825039133483a2c41 Mon Sep 17 00:00:00 2001 -From: Szabolcs Nagy <nsz@port70.net> -Date: Sun, 4 Sep 2016 04:46:00 +0200 -Subject: [PATCH 23/25] fix strtod and strtof rounding with many trailing zeros - -in certain cases excessive trailing zeros could cause incorrect -rounding from long double to double or float in decfloat. - -e.g. in strtof("9444733528689243848704.000000", 0) the argument -is 0x1.000001p+73, exactly halfway between two representible floats, -this incorrectly got rounded to 0x1.000002p+73 instead of 0x1p+73, -but with less trailing 0 the rounding was fine. - -the fix makes sure that the z index always points one past the last -non-zero digit in the base 10^9 representation, this way trailing -zeros don't affect the rounding logic. ---- - src/internal/floatscan.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/src/internal/floatscan.c b/src/internal/floatscan.c -index eef70df..80305ee 100644 ---- a/src/internal/floatscan.c -+++ b/src/internal/floatscan.c -@@ -172,6 +172,9 @@ static long double decfloat(FILE *f, int c, int bits, int emin, int sign, int po - return sign * (long double)x[0] * p10s[rp-10]; - } - -+ /* Drop trailing zeros */ -+ for (; !x[z-1]; z--); -+ - /* Align radix point to B1B digit boundary */ - if (rp % 9) { - int rpm9 = rp>=0 ? rp%9 : rp%9+9; --- -2.10.1 - diff --git a/main/musl/0024-fix-strtod-int-optimization-in-non-nearest-rounding-.patch b/main/musl/0024-fix-strtod-int-optimization-in-non-nearest-rounding-.patch deleted file mode 100644 index 2d6def1957..0000000000 --- a/main/musl/0024-fix-strtod-int-optimization-in-non-nearest-rounding-.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 6ffdc4579ffb34f4aab69ab4c081badabc7c0a9a Mon Sep 17 00:00:00 2001 -From: Szabolcs Nagy <nsz@port70.net> -Date: Sun, 4 Sep 2016 04:51:03 +0200 -Subject: [PATCH 24/25] fix strtod int optimization in non-nearest rounding - mode - -the mid-sized integer optimization relies on lnz set up properly -to mark the last non-zero decimal digit, but this was not done -if the non-zero digit lied outside the KMAX digits of the base -10^9 number representation. - -so if the fractional part was a very long list of zeros (>2048*9 on -x86) followed by non-zero digits then the integer optimization could -kick in discarding the tiny non-zero fraction which can mean wrong -result on non-nearest rounding mode. - -strtof, strtod and strtold were all affected. ---- - src/internal/floatscan.c | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/src/internal/floatscan.c b/src/internal/floatscan.c -index 80305ee..ae09852 100644 ---- a/src/internal/floatscan.c -+++ b/src/internal/floatscan.c -@@ -110,7 +110,10 @@ static long double decfloat(FILE *f, int c, int bits, int emin, int sign, int po - gotdig=1; - } else { - dc++; -- if (c!='0') x[KMAX-4] |= 1; -+ if (c!='0') { -+ lnz = dc; -+ x[KMAX-4] |= 1; -+ } - } - } - if (!gotrad) lrp=dc; --- -2.10.1 - diff --git a/main/musl/0025-fix-minor-problem-in-previous-strtod-non-nearest-rou.patch b/main/musl/0025-fix-minor-problem-in-previous-strtod-non-nearest-rou.patch deleted file mode 100644 index 623729e37a..0000000000 --- a/main/musl/0025-fix-minor-problem-in-previous-strtod-non-nearest-rou.patch +++ /dev/null @@ -1,35 +0,0 @@ -From e314258e2fe75b7443db84d2927315dea0f337c8 Mon Sep 17 00:00:00 2001 -From: Rich Felker <dalias@aerifal.cx> -Date: Thu, 20 Oct 2016 14:40:59 -0400 -Subject: [PATCH 25/25] fix minor problem in previous strtod non-nearest - rounding bug fix - -commit 6ffdc4579ffb34f4aab69ab4c081badabc7c0a9a set lnz in the code -path for non-zero digits after a huge string of zeros, but the -assignment of dc to lnz truncates if the value of dc does not fit in -int; this is possible for some pathologically long inputs, either via -strings on 64-bit systems or via scanf-family functions. - -instead, simply set lnz to match the point at which we add the -artificial trailing 1 bit to simulate nonzero digits after a huge -run of zeros. ---- - src/internal/floatscan.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/internal/floatscan.c b/src/internal/floatscan.c -index ae09852..278bf25 100644 ---- a/src/internal/floatscan.c -+++ b/src/internal/floatscan.c -@@ -111,7 +111,7 @@ static long double decfloat(FILE *f, int c, int bits, int emin, int sign, int po - } else { - dc++; - if (c!='0') { -- lnz = dc; -+ lnz = (KMAX-4)*9; - x[KMAX-4] |= 1; - } - } --- -2.10.1 - diff --git a/main/musl/0026-fix-typo-in-utmpx.h.patch b/main/musl/0026-fix-typo-in-utmpx.h.patch deleted file mode 100644 index d9a7e6e7e4..0000000000 --- a/main/musl/0026-fix-typo-in-utmpx.h.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 1fa2a32d1e2d25f493058812008face73d411b2b Mon Sep 17 00:00:00 2001 -From: Daniel Sabogal <dsabogalcc@gmail.com> -Date: Sun, 4 Sep 2016 10:42:48 -0400 -Subject: [PATCH] fix typo in utmpx.h - ---- - include/utmpx.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/include/utmpx.h b/include/utmpx.h -index 9e5cc955..0429014d 100644 ---- a/include/utmpx.h -+++ b/include/utmpx.h -@@ -38,7 +38,7 @@ struct utmpx *getutxline(const struct utmpx *); - struct utmpx *pututxline(const struct utmpx *); - void setutxent(void); - --#if defined(_BSD_SOURCE) | defined(_GNU_SOURCE) -+#if defined(_BSD_SOURCE) || defined(_GNU_SOURCE) - #define e_exit __e_exit - #define e_termination __e_termination - void updwtmpx(const char *, const struct utmpx *); --- -2.11.0 - diff --git a/main/musl/0027-fix-misspelling-of-a-legacy-macro-name-in-sys-param..patch b/main/musl/0027-fix-misspelling-of-a-legacy-macro-name-in-sys-param..patch deleted file mode 100644 index b0a472a95e..0000000000 --- a/main/musl/0027-fix-misspelling-of-a-legacy-macro-name-in-sys-param..patch +++ /dev/null @@ -1,25 +0,0 @@ -From 4b8f94c2501e6fea3db631b73b0c91e34e2134cf Mon Sep 17 00:00:00 2001 -From: Rich Felker <dalias@aerifal.cx> -Date: Thu, 20 Oct 2016 17:01:56 -0400 -Subject: [PATCH] fix misspelling of a legacy macro name in sys/param.h - ---- - include/sys/param.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/include/sys/param.h b/include/sys/param.h -index 344c0d23..ce6b8019 100644 ---- a/include/sys/param.h -+++ b/include/sys/param.h -@@ -7,7 +7,7 @@ - #define MAXPATHLEN 4096 - #define NBBY 8 - #define NGROUPS 32 --#define CANBSIZE 255 -+#define CANBSIZ 255 - #define NOFILE 256 - #define NCARGS 131072 - #define DEV_BSIZE 512 --- -2.11.0 - diff --git a/main/musl/0028-fix-parsing-of-quoted-time-zone-names.patch b/main/musl/0028-fix-parsing-of-quoted-time-zone-names.patch deleted file mode 100644 index ac99f08db8..0000000000 --- a/main/musl/0028-fix-parsing-of-quoted-time-zone-names.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 8ca27ac4bfe73bff785d0c26c1de0da92b55e5c6 Mon Sep 17 00:00:00 2001 -From: Hannu Nyman <hannu.nyman@iki.fi> -Date: Mon, 24 Oct 2016 13:12:24 +0300 -Subject: [PATCH] fix parsing of quoted time zone names - -Fix parsing of the < > quoted time zone names. Compare the correct -character instead of repeatedly comparing the first character. ---- - src/time/__tz.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/time/__tz.c b/src/time/__tz.c -index 8b84b9bd..0e0c4ea2 100644 ---- a/src/time/__tz.c -+++ b/src/time/__tz.c -@@ -84,7 +84,7 @@ static void getname(char *d, const char **p) - int i; - if (**p == '<') { - ++*p; -- for (i=0; **p!='>' && i<TZNAME_MAX; i++) -+ for (i=0; (*p)[i]!='>' && i<TZNAME_MAX; i++) - d[i] = (*p)[i]; - ++*p; - } else { --- -2.11.0 - diff --git a/main/musl/0029-fix-accidental-global-static-pointer-in-ldso.patch b/main/musl/0029-fix-accidental-global-static-pointer-in-ldso.patch deleted file mode 100644 index 6d18c6a721..0000000000 --- a/main/musl/0029-fix-accidental-global-static-pointer-in-ldso.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 86e8cc0fd46f5789e80a16d68ae86f7358f64705 Mon Sep 17 00:00:00 2001 -From: Szabolcs Nagy <nsz@port70.net> -Date: Tue, 1 Nov 2016 02:44:56 +0100 -Subject: [PATCH] fix accidental global static pointer in ldso - -this was harmless as load_library is not called concurrently, -but it used one word of bss. ---- - ldso/dynlink.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/ldso/dynlink.c b/ldso/dynlink.c -index e458f386..d11776dc 100644 ---- a/ldso/dynlink.c -+++ b/ldso/dynlink.c -@@ -905,8 +905,9 @@ static struct dso *load_library(const char *name, struct dso *needed_by) - - /* Catch and block attempts to reload the implementation itself */ - if (name[0]=='l' && name[1]=='i' && name[2]=='b') { -- static const char *rp, reserved[] = -+ static const char reserved[] = - "c\0pthread\0rt\0m\0dl\0util\0xnet\0"; -+ const char *rp; - char *z = strchr(name, '.'); - if (z) { - size_t l = z-name; --- -2.11.0 - diff --git a/main/musl/0030-fix-ldso-reserved-library-name-handling.patch b/main/musl/0030-fix-ldso-reserved-library-name-handling.patch deleted file mode 100644 index fc410c6a46..0000000000 --- a/main/musl/0030-fix-ldso-reserved-library-name-handling.patch +++ /dev/null @@ -1,69 +0,0 @@ -From 5ffe515ca485c8e6e57cd5acda6bc6008f85660c Mon Sep 17 00:00:00 2001 -From: Szabolcs Nagy <nsz@port70.net> -Date: Tue, 1 Nov 2016 02:49:09 +0100 -Subject: [PATCH] fix ldso reserved library name handling - -If a DT_NEEDED entry was the prefix of a reserved library name -(up to the first dot) then it was incorrectly treated as a libc -reserved name. - -e.g. libp.so dependency was not loaded as it matched libpthread -reserved name. ---- - ldso/dynlink.c | 38 +++++++++++++++++++------------------- - 1 file changed, 19 insertions(+), 19 deletions(-) - -diff --git a/ldso/dynlink.c b/ldso/dynlink.c -index d11776dc..acb73bc2 100644 ---- a/ldso/dynlink.c -+++ b/ldso/dynlink.c -@@ -906,27 +906,27 @@ static struct dso *load_library(const char *name, struct dso *needed_by) - /* Catch and block attempts to reload the implementation itself */ - if (name[0]=='l' && name[1]=='i' && name[2]=='b') { - static const char reserved[] = -- "c\0pthread\0rt\0m\0dl\0util\0xnet\0"; -- const char *rp; -- char *z = strchr(name, '.'); -- if (z) { -- size_t l = z-name; -- for (rp=reserved; *rp && strncmp(name+3, rp, l-3); rp+=strlen(rp)+1); -- if (*rp) { -- if (ldd_mode) { -- /* Track which names have been resolved -- * and only report each one once. */ -- static unsigned reported; -- unsigned mask = 1U<<(rp-reserved); -- if (!(reported & mask)) { -- reported |= mask; -- dprintf(1, "\t%s => %s (%p)\n", -- name, ldso.name, -- ldso.base); -- } -+ "c.pthread.rt.m.dl.util.xnet."; -+ const char *rp, *next; -+ for (rp=reserved; *rp; rp=next) { -+ next = strchr(rp, '.') + 1; -+ if (strncmp(name+3, rp, next-rp) == 0) -+ break; -+ } -+ if (*rp) { -+ if (ldd_mode) { -+ /* Track which names have been resolved -+ * and only report each one once. */ -+ static unsigned reported; -+ unsigned mask = 1U<<(rp-reserved); -+ if (!(reported & mask)) { -+ reported |= mask; -+ dprintf(1, "\t%s => %s (%p)\n", -+ name, ldso.name, -+ ldso.base); - } -- is_self = 1; - } -+ is_self = 1; - } - } - if (!strcmp(name, ldso.name)) is_self = 1; --- -2.11.0 - diff --git a/main/musl/0031-fix-integer-overflow-of-tm_year-in-__secs_to_tm.patch b/main/musl/0031-fix-integer-overflow-of-tm_year-in-__secs_to_tm.patch deleted file mode 100644 index 1a8e05010d..0000000000 --- a/main/musl/0031-fix-integer-overflow-of-tm_year-in-__secs_to_tm.patch +++ /dev/null @@ -1,40 +0,0 @@ -From bc1e7731cee963e422575f81048792f4d5db9641 Mon Sep 17 00:00:00 2001 -From: Daniel Sabogal <dsabogal@ufl.edu> -Date: Wed, 2 Nov 2016 22:29:36 -0400 -Subject: [PATCH] fix integer overflow of tm_year in __secs_to_tm - -the overflow check for years+100 did not account for the extra -year computed from the remaining months. instead, perform this -check after obtaining the final number of years. ---- - src/time/__secs_to_tm.c | 9 +++++---- - 1 file changed, 5 insertions(+), 4 deletions(-) - -diff --git a/src/time/__secs_to_tm.c b/src/time/__secs_to_tm.c -index 3a3123a1..093d9021 100644 ---- a/src/time/__secs_to_tm.c -+++ b/src/time/__secs_to_tm.c -@@ -60,15 +60,16 @@ int __secs_to_tm(long long t, struct tm *tm) - for (months=0; days_in_month[months] <= remdays; months++) - remdays -= days_in_month[months]; - -+ if (months >= 10) { -+ months -= 12; -+ years++; -+ } -+ - if (years+100 > INT_MAX || years+100 < INT_MIN) - return -1; - - tm->tm_year = years + 100; - tm->tm_mon = months + 2; -- if (tm->tm_mon >= 12) { -- tm->tm_mon -=12; -- tm->tm_year++; -- } - tm->tm_mday = remdays + 1; - tm->tm_wday = wday; - tm->tm_yday = yday; --- -2.11.0 - diff --git a/main/musl/0032-fix-swprintf-internal-buffer-state-and-error-handlin.patch b/main/musl/0032-fix-swprintf-internal-buffer-state-and-error-handlin.patch deleted file mode 100644 index 1cc419c640..0000000000 --- a/main/musl/0032-fix-swprintf-internal-buffer-state-and-error-handlin.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 7442442ccc665641a8827177e8e7ed45bbbd6584 Mon Sep 17 00:00:00 2001 -From: Rich Felker <dalias@aerifal.cx> -Date: Mon, 7 Nov 2016 20:39:59 -0500 -Subject: [PATCH] fix swprintf internal buffer state and error handling - -the swprintf write callback never reset its buffer pointers, so after -its 256-byte buffer filled up, it would keep repeating those bytes -over and over in the output until the destination buffer filled up. it -also failed to set the error indicator for the stream on EILSEQ, -potentially allowing output to continue after the error. ---- - src/stdio/vswprintf.c | 9 ++++++++- - 1 file changed, 8 insertions(+), 1 deletion(-) - -diff --git a/src/stdio/vswprintf.c b/src/stdio/vswprintf.c -index 7d237bae..6eb2f6ac 100644 ---- a/src/stdio/vswprintf.c -+++ b/src/stdio/vswprintf.c -@@ -24,7 +24,14 @@ static size_t sw_write(FILE *f, const unsigned char *s, size_t l) - c->ws++; - } - *c->ws = 0; -- return i<0 ? i : l0; -+ if (i < 0) { -+ f->wpos = f->wbase = f->wend = 0; -+ f->flags |= F_ERR; -+ return i; -+ } -+ f->wend = f->buf + f->buf_size; -+ f->wpos = f->wbase = f->buf; -+ return l0; - } - - int vswprintf(wchar_t *restrict s, size_t n, const wchar_t *restrict fmt, va_list ap) --- -2.11.0 - diff --git a/main/musl/0033-work-around-gdb-issues-recognizing-sigreturn-trampol.patch b/main/musl/0033-work-around-gdb-issues-recognizing-sigreturn-trampol.patch deleted file mode 100644 index a248464502..0000000000 --- a/main/musl/0033-work-around-gdb-issues-recognizing-sigreturn-trampol.patch +++ /dev/null @@ -1,101 +0,0 @@ -From 54991729fd1e3d3a0cb71884d758d86afe6da9e0 Mon Sep 17 00:00:00 2001 -From: Rich Felker <dalias@aerifal.cx> -Date: Sat, 12 Nov 2016 19:43:37 -0500 -Subject: [PATCH] work around gdb issues recognizing sigreturn trampoline on - x86_64 - -gdb can only backtrace/unwind across signal handlers if it recognizes -the sa_restorer trampoline. for x86_64, gdb first attempts to -determine the symbol name for the function in which the program -counter resides and match it against "__restore_rt". if no name can be -found (e.g. in the case of a stripped binary), the exact instruction -sequence is matched instead. - -when matching the function name, however, gdb's unwind code wrongly -considers the interval [sym,sym+size] rather than [sym,sym+size). -thus, if __restore_rt begins immediately after another function, gdb -wrongly identifies pc as lying within the previous adjacent function. -this patch adds a nop before __restore_rt to preclude that -possibility. it also removes the symbol name __restore and replaces it -with a macro since the stability of whether gdb identifies the -function as __restore_rt or __restore is not clear. - -for the no-symbols case, the instruction sequence is changed to use -%rax rather than %eax to match what gdb expects. - -based on patch by Szabolcs Nagy, with extended description and -corresponding x32 changes added. ---- - arch/x32/ksigaction.h | 9 +++++++++ - arch/x86_64/ksigaction.h | 9 +++++++++ - src/signal/x32/restore.s | 7 +++---- - src/signal/x86_64/restore.s | 7 +++---- - 4 files changed, 24 insertions(+), 8 deletions(-) - create mode 100644 arch/x32/ksigaction.h - create mode 100644 arch/x86_64/ksigaction.h - -diff --git a/arch/x32/ksigaction.h b/arch/x32/ksigaction.h -new file mode 100644 -index 00000000..7743c5c6 ---- /dev/null -+++ b/arch/x32/ksigaction.h -@@ -0,0 +1,9 @@ -+struct k_sigaction { -+ void (*handler)(int); -+ unsigned long flags; -+ void (*restorer)(void); -+ unsigned mask[2]; -+}; -+ -+void __restore_rt(); -+#define __restore __restore_rt -diff --git a/arch/x86_64/ksigaction.h b/arch/x86_64/ksigaction.h -new file mode 100644 -index 00000000..7743c5c6 ---- /dev/null -+++ b/arch/x86_64/ksigaction.h -@@ -0,0 +1,9 @@ -+struct k_sigaction { -+ void (*handler)(int); -+ unsigned long flags; -+ void (*restorer)(void); -+ unsigned mask[2]; -+}; -+ -+void __restore_rt(); -+#define __restore __restore_rt -diff --git a/src/signal/x32/restore.s b/src/signal/x32/restore.s -index 27cd3cef..2f06e787 100644 ---- a/src/signal/x32/restore.s -+++ b/src/signal/x32/restore.s -@@ -1,8 +1,7 @@ -+ nop - .global __restore_rt --.global __restore - .type __restore_rt,@function --.type __restore,@function - __restore_rt: --__restore: -- movl $0x40000201, %eax /* SYS_rt_sigreturn */ -+ mov $0x40000201, %rax /* SYS_rt_sigreturn */ - syscall -+.size __restore_rt,.-__restore_rt -diff --git a/src/signal/x86_64/restore.s b/src/signal/x86_64/restore.s -index 682af2dd..b5c6e37f 100644 ---- a/src/signal/x86_64/restore.s -+++ b/src/signal/x86_64/restore.s -@@ -1,8 +1,7 @@ -+ nop - .global __restore_rt --.global __restore - .type __restore_rt,@function --.type __restore,@function - __restore_rt: --__restore: -- movl $15, %eax -+ mov $15, %rax - syscall -+.size __restore_rt,.-__restore_rt --- -2.11.0 - diff --git a/main/musl/0034-fix-mrand48-jrand48-return-value-on-64-bit-archs.patch b/main/musl/0034-fix-mrand48-jrand48-return-value-on-64-bit-archs.patch deleted file mode 100644 index 6d1cb1c6a4..0000000000 --- a/main/musl/0034-fix-mrand48-jrand48-return-value-on-64-bit-archs.patch +++ /dev/null @@ -1,30 +0,0 @@ -From adfe682eb0d77c6afc751f5e407d9da39623c24e Mon Sep 17 00:00:00 2001 -From: Rich Felker <dalias@aerifal.cx> -Date: Fri, 16 Dec 2016 23:19:27 -0500 -Subject: [PATCH] fix mrand48/jrand48 return value on 64-bit archs - -POSIX specifies the result to have signed 32-bit range. on 32-bit -archs, the implicit conversion to long achieved the desired range -already, but when long is 64-bit, a cast is needed. - -patch by Ed Schouten. ---- - src/prng/mrand48.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/prng/mrand48.c b/src/prng/mrand48.c -index ee650fc3..0519d667 100644 ---- a/src/prng/mrand48.c -+++ b/src/prng/mrand48.c -@@ -6,7 +6,7 @@ extern unsigned short __seed48[7]; - - long jrand48(unsigned short s[3]) - { -- return __rand48_step(s, __seed48+3) >> 16; -+ return (int32_t)(__rand48_step(s, __seed48+3) >> 16); - } - - long mrand48(void) --- -2.11.0 - diff --git a/main/musl/0035-handle-and-in-BRE-subexpression-start-and-end-as-anc.patch b/main/musl/0035-handle-and-in-BRE-subexpression-start-and-end-as-anc.patch deleted file mode 100644 index fee0ae8726..0000000000 --- a/main/musl/0035-handle-and-in-BRE-subexpression-start-and-end-as-anc.patch +++ /dev/null @@ -1,112 +0,0 @@ -From 7a4c25d78030b3a43ed5c8dd1a456f73cb990f44 Mon Sep 17 00:00:00 2001 -From: Szabolcs Nagy <nsz@port70.net> -Date: Thu, 24 Nov 2016 01:44:49 +0100 -Subject: [PATCH] handle ^ and $ in BRE subexpression start and end as anchors - -In BRE, ^ is an anchor at the beginning of an expression, optionally -it may be an anchor at the beginning of a subexpression and must be -treated as a literal otherwise. - -Previously musl treated ^ in subexpressions as literal, but at least -glibc and gnu sed treats it as an anchor and that's the more useful -behaviour: it can always be escaped to get back the literal meaning. - -Same for $ at the end of a subexpression. - -Portable BRE should not rely on this, but there are sed commands in -build scripts which do. - -This changes the meaning of the BREs: - - \(^a\) - \(a\|^b\) - \(a$\) - \(a$\|b\) ---- - src/regex/regcomp.c | 21 ++++++++++++--------- - 1 file changed, 12 insertions(+), 9 deletions(-) - -diff --git a/src/regex/regcomp.c b/src/regex/regcomp.c -index 65f2fd0b..5a7b53a7 100644 ---- a/src/regex/regcomp.c -+++ b/src/regex/regcomp.c -@@ -401,8 +401,8 @@ typedef struct { - tre_ast_node_t *n; - /* Position in the regexp pattern after a parse function returns. */ - const char *s; -- /* The first character of the regexp. */ -- const char *re; -+ /* The first character of the last subexpression parsed. */ -+ const char *start; - /* Current submatch ID. */ - int submatch_id; - /* Current position (number of literal). */ -@@ -876,14 +876,14 @@ static reg_errcode_t parse_atom(tre_parse_ctx_t *ctx, const char *s) - break; - case '^': - /* '^' has a special meaning everywhere in EREs, and at beginning of BRE. */ -- if (!ere && s != ctx->re) -+ if (!ere && s != ctx->start) - goto parse_literal; - node = tre_ast_new_literal(ctx->mem, ASSERTION, ASSERT_AT_BOL, -1); - s++; - break; - case '$': -- /* '$' is special everywhere in EREs, and in the end of the string in BREs. */ -- if (!ere && s[1]) -+ /* '$' is special everywhere in EREs, and at the end of a BRE subexpression. */ -+ if (!ere && s[1] && (s[1]!='\\'|| (s[2]!=')' && s[2]!='|'))) - goto parse_literal; - node = tre_ast_new_literal(ctx->mem, ASSERTION, ASSERT_AT_EOL, -1); - s++; -@@ -944,7 +944,7 @@ static reg_errcode_t tre_parse(tre_parse_ctx_t *ctx) - { - tre_ast_node_t *nbranch=0, *nunion=0; - int ere = ctx->cflags & REG_EXTENDED; -- const char *s = ctx->re; -+ const char *s = ctx->start; - int subid = 0; - int depth = 0; - reg_errcode_t err; -@@ -962,6 +962,7 @@ static reg_errcode_t tre_parse(tre_parse_ctx_t *ctx) - s++; - depth++; - nbranch = nunion = 0; -+ ctx->start = s; - continue; - } - if ((!ere && *s == '\\' && s[1] == ')') || -@@ -994,8 +995,8 @@ 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]=='^') -+ /* handle ^* at the start of a BRE. */ -+ if (!ere && s==ctx->start+1 && s[-1]=='^') - break; - - /* extension: multiple consecutive *+?{,} is unspecified, -@@ -1038,8 +1039,10 @@ static reg_errcode_t tre_parse(tre_parse_ctx_t *ctx) - - if (c == '\\' && s[1] == '|') { - s+=2; -+ ctx->start = s; - } else if (c == '|') { - s++; -+ ctx->start = s; - } else { - if (c == '\\') { - if (!depth) return REG_EPAREN; -@@ -2705,7 +2708,7 @@ regcomp(regex_t *restrict preg, const char *restrict regex, int cflags) - memset(&parse_ctx, 0, sizeof(parse_ctx)); - parse_ctx.mem = mem; - parse_ctx.stack = stack; -- parse_ctx.re = regex; -+ parse_ctx.start = regex; - parse_ctx.cflags = cflags; - parse_ctx.max_backref = -1; - errcode = tre_parse(&parse_ctx); --- -2.11.0 - diff --git a/main/musl/1001-add-support-for-pthread_-get-set-attr_default_np-GNU.patch b/main/musl/1001-add-support-for-pthread_-get-set-attr_default_np-GNU.patch deleted file mode 100644 index 93d939df76..0000000000 --- a/main/musl/1001-add-support-for-pthread_-get-set-attr_default_np-GNU.patch +++ /dev/null @@ -1,95 +0,0 @@ -From 8c9088d0fc253a0f53f206832714e9e5138a4438 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi> -Date: Tue, 25 Oct 2016 17:00:54 +0300 -Subject: [PATCH 1001/1001] add support for pthread_{get,set}attr_default_np - GNU extension - -While generally this is a bad API, it is the only existing API to -affect c++ (std::thread) and c11 (thrd_create) thread stack size. -This patch allows applications only to increate stack and guard -page sizes. ---- - include/pthread.h | 2 ++ - src/thread/pthread_create.c | 7 +++++++ - src/thread/pthread_setattr_default_np.c | 31 +++++++++++++++++++++++++++++++ - 3 files changed, 40 insertions(+) - create mode 100644 src/thread/pthread_setattr_default_np.c - -diff --git a/include/pthread.h b/include/pthread.h -index 94ef919..bba9587 100644 ---- a/include/pthread.h -+++ b/include/pthread.h -@@ -215,6 +215,8 @@ int pthread_getaffinity_np(pthread_t, size_t, struct cpu_set_t *); - int pthread_setaffinity_np(pthread_t, size_t, const struct cpu_set_t *); - int pthread_getattr_np(pthread_t, pthread_attr_t *); - int pthread_setname_np(pthread_t, const char *); -+int pthread_getattr_default_np(pthread_attr_t *); -+int pthread_setattr_default_np(const pthread_attr_t *); - int pthread_tryjoin_np(pthread_t, void **); - int pthread_timedjoin_np(pthread_t, void **, const struct timespec *); - #endif -diff --git a/src/thread/pthread_create.c b/src/thread/pthread_create.c -index 9f6b98e..28cf6d4 100644 ---- a/src/thread/pthread_create.c -+++ b/src/thread/pthread_create.c -@@ -163,6 +163,8 @@ static void *dummy_tsd[1] = { 0 }; - weak_alias(dummy_tsd, __pthread_tsd_main); - - volatile int __block_new_threads = 0; -+size_t __default_stacksize = 0; -+size_t __default_guardsize = 0; - - static FILE *volatile dummy_file = 0; - weak_alias(dummy_file, __stdin_used); -@@ -204,6 +206,11 @@ int __pthread_create(pthread_t *restrict res, const pthread_attr_t *restrict att - if (attrp && !c11) attr = *attrp; - - __acquire_ptc(); -+ if (!attrp || c11) { -+ attr._a_stacksize = __default_stacksize; -+ attr._a_guardsize = __default_guardsize; -+ } -+ - if (__block_new_threads) __wait(&__block_new_threads, 0, 1, 1); - - if (attr._a_stackaddr) { -diff --git a/src/thread/pthread_setattr_default_np.c b/src/thread/pthread_setattr_default_np.c -new file mode 100644 -index 0000000..21cd0f3 ---- /dev/null -+++ b/src/thread/pthread_setattr_default_np.c -@@ -0,0 +1,31 @@ -+#include "pthread_impl.h" -+ -+extern size_t __default_stacksize; -+extern size_t __default_guardsize; -+ -+int pthread_setattr_default_np(const pthread_attr_t *attrp) -+{ -+ if (attrp->_a_stackaddr || attrp->_a_detach || -+ attrp->_a_sched || attrp->_a_policy || attrp->_a_prio) -+ return EINVAL; -+ -+ __inhibit_ptc(); -+ if (DEFAULT_STACK_SIZE+attrp->_a_stacksize >= DEFAULT_STACK_SIZE+__default_stacksize) -+ __default_stacksize = attrp->_a_stacksize; -+ if (DEFAULT_GUARD_SIZE+attrp->_a_guardsize >= DEFAULT_GUARD_SIZE+__default_guardsize) -+ __default_guardsize = attrp->_a_guardsize; -+ __release_ptc(); -+ -+ return 0; -+} -+ -+int pthread_getattr_default_np(pthread_attr_t *attrp) -+{ -+ __acquire_ptc(); -+ *attrp = (pthread_attr_t) { -+ ._a_stacksize = __default_stacksize, -+ ._a_guardsize = __default_guardsize, -+ }; -+ __release_ptc(); -+ return 0; -+} --- -2.10.1 - diff --git a/main/musl/APKBUILD b/main/musl/APKBUILD index a311a2ba15..dd3dccf417 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.15 -pkgrel=6 +pkgver=1.1.16 +pkgrel=0 pkgdesc="the musl c library (libc) implementation" url="http://www.musl-libc.org/" arch="all" @@ -13,44 +13,6 @@ makedepends="$depends_dev" subpackages="$pkgname-dev $pkgname-dbg libc6-compat:compat:noarch" [ "$BOOTSTRAP" != "nolibc" ] && subpackages="$subpackages $pkgname-utils" source="http://www.musl-libc.org/releases/musl-$pkgver.tar.gz - 0001-fix-asctime-day-month-names-not-to-vary-by-locale.patch - 0001-verify-that-ttyname-refers-to-the-same-file-as-the-f.patch - 0002-math-fix-128bit-long-double-inverse-trigonometric-fu.patch - 0003-fix-FFSYNC-by-changing-it-to-O_SYNC.patch - 0004-getdtablesize-fix-returning-hard-instead-of-soft-rli.patch - 0005-restore-_Noreturn-to-__assert_fail.patch - 0006-fix-printf-regression-with-alt-form-octal-zero-flag-.patch - 0007-fix-ifru_data-and-ifcu_buf-types-in-net-if.h.patch - 0008-fix-if_indextoname-error-case.patch - 0009-add-missing-_unlocked-and-wcsftime_l-prototypes-to-w.patch - 0010-simplify-refactor-fflush-and-make-fflush_unlocked-an.patch - 0011-fix-undefined-behavior-in-sched.h-cpu_set_t-usage.patch - 0012-fix-getservby-_r-result-pointer-value-on-error.patch - 0013-fix-strftime-y-for-negative-tm_year.patch - 0014-fix-missing-integer-overflow-checks-in-regexec-buffe.patch - 0015-fix-regexec-with-haystack-strings-longer-than-INT_MA.patch - 0016-fix-integer-overflow-in-float-printf-needed-precisio.patch - 0017-fix-integer-overflows-and-uncaught-EOVERFLOW-in-prin.patch - 0018-fix-clock_nanosleep-error-case.patch - 0018-use-dynamic-buffer-for-getmntent.patch - 0019-add-pthread_setname_np.patch - 0020-fix-float-formatting-of-some-exact-halfway-cases.patch - 0021-fix-getopt_long_only-misinterpreting-as-an-option.patch - 0022-fix-gratuitous-undefined-behavior-in-strptime.patch - 0023-fix-strtod-and-strtof-rounding-with-many-trailing-ze.patch - 0024-fix-strtod-int-optimization-in-non-nearest-rounding-.patch - 0025-fix-minor-problem-in-previous-strtod-non-nearest-rou.patch - 0026-fix-typo-in-utmpx.h.patch - 0027-fix-misspelling-of-a-legacy-macro-name-in-sys-param..patch - 0028-fix-parsing-of-quoted-time-zone-names.patch - 0029-fix-accidental-global-static-pointer-in-ldso.patch - 0030-fix-ldso-reserved-library-name-handling.patch - 0031-fix-integer-overflow-of-tm_year-in-__secs_to_tm.patch - 0032-fix-swprintf-internal-buffer-state-and-error-handlin.patch - 0033-work-around-gdb-issues-recognizing-sigreturn-trampol.patch - 0034-fix-mrand48-jrand48-return-value-on-64-bit-archs.patch - 0035-handle-and-in-BRE-subexpression-start-and-end-as-anc.patch - 1001-add-support-for-pthread_-get-set-attr_default_np-GNU.patch ldconfig __stack_chk_fail_local.c @@ -162,133 +124,19 @@ compat() { done } -md5sums="9590a9d47ee64f220b3c12f7afb864ca musl-1.1.15.tar.gz -c08825383e41e5dbcd3ffdfd2062dd47 0001-fix-asctime-day-month-names-not-to-vary-by-locale.patch -361341eafbd9df0537ae0c3c82ac62fb 0001-verify-that-ttyname-refers-to-the-same-file-as-the-f.patch -c5ab949b2cbfee521e1ac63eee7fdcde 0002-math-fix-128bit-long-double-inverse-trigonometric-fu.patch -adadb0b34060acb834cc7d6b02ecba2a 0003-fix-FFSYNC-by-changing-it-to-O_SYNC.patch -24d2150154f19dbd27303389ce17b525 0004-getdtablesize-fix-returning-hard-instead-of-soft-rli.patch -3449436c98bc888b84273eeb9cd2f3bb 0005-restore-_Noreturn-to-__assert_fail.patch -31e1eb80acc738f6a036f01b2df20b61 0006-fix-printf-regression-with-alt-form-octal-zero-flag-.patch -f62c94f99b4bc7d3ee098ecc96d2a1e6 0007-fix-ifru_data-and-ifcu_buf-types-in-net-if.h.patch -56cd68a29e0ce52fea65f28f5a785c83 0008-fix-if_indextoname-error-case.patch -a50530618bf95834f8219e822e6901a5 0009-add-missing-_unlocked-and-wcsftime_l-prototypes-to-w.patch -77b27159df61008af0bcb86d0986465f 0010-simplify-refactor-fflush-and-make-fflush_unlocked-an.patch -7c642b601ce81d5418f0666fc12a5fdd 0011-fix-undefined-behavior-in-sched.h-cpu_set_t-usage.patch -2394217798cfa65458c0d29e4dc5459d 0012-fix-getservby-_r-result-pointer-value-on-error.patch -de027daccdff4efee5d2801158eeedfd 0013-fix-strftime-y-for-negative-tm_year.patch -0b601e844bedd6b9af1da515bb40a0d5 0014-fix-missing-integer-overflow-checks-in-regexec-buffe.patch -8248da439e4a7489ead6213501e0dfc9 0015-fix-regexec-with-haystack-strings-longer-than-INT_MA.patch -47e54b3d82053d4a7d3eb7cd2c87fd97 0016-fix-integer-overflow-in-float-printf-needed-precisio.patch -dc76f0b70aa56c2f1284d3a79d04ca23 0017-fix-integer-overflows-and-uncaught-EOVERFLOW-in-prin.patch -17e6c4d84396cff82418b6860d499c2b 0018-fix-clock_nanosleep-error-case.patch -a679721e73f778d34a5f357fa884b49d 0018-use-dynamic-buffer-for-getmntent.patch -4fdc7b428e93213d28293a04344054c2 0019-add-pthread_setname_np.patch -df48f35ff1e8084b5b01223917a11c32 0020-fix-float-formatting-of-some-exact-halfway-cases.patch -499cf72f3ce881609130411ebb757be6 0021-fix-getopt_long_only-misinterpreting-as-an-option.patch -2507ca119bad0b33713a886e7ccba72a 0022-fix-gratuitous-undefined-behavior-in-strptime.patch -0169f80be7c767e3f8cd736bbf773bde 0023-fix-strtod-and-strtof-rounding-with-many-trailing-ze.patch -e9ef5ab7879cc113895d37783b217a70 0024-fix-strtod-int-optimization-in-non-nearest-rounding-.patch -2019fe5ed6214ff647d499fcd00fdb66 0025-fix-minor-problem-in-previous-strtod-non-nearest-rou.patch -855dda2bd43cd4647bbbe187ae21c1e5 0026-fix-typo-in-utmpx.h.patch -71e91fa6e59eb8dc2fbcff481f8d6940 0027-fix-misspelling-of-a-legacy-macro-name-in-sys-param..patch -bbbddbc14f9868e2970847388c7eced3 0028-fix-parsing-of-quoted-time-zone-names.patch -d7370f099f1f66a21f08e09ab565e2b2 0029-fix-accidental-global-static-pointer-in-ldso.patch -487824144894dc7b2f681559e90c47a3 0030-fix-ldso-reserved-library-name-handling.patch -ad302311ae40f2812f03978a6fd70c62 0031-fix-integer-overflow-of-tm_year-in-__secs_to_tm.patch -ecccf2709616b972b03af5c6a5ef1433 0032-fix-swprintf-internal-buffer-state-and-error-handlin.patch -fb41ec1bf483e92cf2b72e0efb700cc3 0033-work-around-gdb-issues-recognizing-sigreturn-trampol.patch -b6913f0456cc06ed111d8b0e7fbee80a 0034-fix-mrand48-jrand48-return-value-on-64-bit-archs.patch -abae86f7c5f1837c38affbe6e120adb9 0035-handle-and-in-BRE-subexpression-start-and-end-as-anc.patch -62806d6be9fa3aedc99831d948abca65 1001-add-support-for-pthread_-get-set-attr_default_np-GNU.patch +md5sums="ac52ccaec6b06ab0f289d37e8436859b musl-1.1.16.tar.gz 830d01f7821b978df770b06db3790921 ldconfig 0df687757221bbb0fc1aa67f1bd646f9 __stack_chk_fail_local.c 57ef2c63b9ec6a2041694ace97d4ffa2 getconf.c eadc8794eadb79dbc383b2b91a32084d getent.c 45f92f8d59cf84d765de698a9578dbf4 iconv.c" -sha256sums="97e447c7ee2a7f613186ec54a93054fe15469fe34d7d323080f7ef38f5ecb0fa musl-1.1.15.tar.gz -d157100aeed5b0866eb6d50288f63f26ea9900f1d4c7b8a1492294c912b5cc19 0001-fix-asctime-day-month-names-not-to-vary-by-locale.patch -c75f8433b499ecd7812423e8bd69e9262d36207f519c79afaa47651cd9924ab9 0001-verify-that-ttyname-refers-to-the-same-file-as-the-f.patch -a2bec5ce9121c02a38a71c9bccac06bda5fa0b6504f67ba78b994b0882ec25e8 0002-math-fix-128bit-long-double-inverse-trigonometric-fu.patch -81efc557cc27dc5d6f93431250703fbeb40682e06524f41eb07b3e3204a439b0 0003-fix-FFSYNC-by-changing-it-to-O_SYNC.patch -83b6ba4869f15f462011d891165de4b7a786d719c3315890a6ddd5d2709e91e0 0004-getdtablesize-fix-returning-hard-instead-of-soft-rli.patch -47bad5028c0d00a03736df33069eb8d3de803608ef7b790a594c0fe09f4d1ac1 0005-restore-_Noreturn-to-__assert_fail.patch -4ea253b510122665f51b9fd0c154c946374749c28359488e19000fd40e6c7e4e 0006-fix-printf-regression-with-alt-form-octal-zero-flag-.patch -95c4c747a12dcfeff9ea1c0a0fe5ea34921617dbc0bde9571237cab67803256f 0007-fix-ifru_data-and-ifcu_buf-types-in-net-if.h.patch -2f09325fe3e0a74c36c47df68799f31364ca687d6d5425282cb1cedb66683b88 0008-fix-if_indextoname-error-case.patch -b3472e284d5846ea22cc50d6ebae533c70babb9e6dce9200aef8f52a67e45461 0009-add-missing-_unlocked-and-wcsftime_l-prototypes-to-w.patch -88cfa5eb1f964fe821d1b67f43cf21849f9d8473a59cb91a702e04d564a59c8d 0010-simplify-refactor-fflush-and-make-fflush_unlocked-an.patch -e3d2642bf119577e68c651e7406e1d6c1201a0b8a8a9d972fda792f31bf4e6ea 0011-fix-undefined-behavior-in-sched.h-cpu_set_t-usage.patch -11b3e53d4a80d854667602c8b2daa6af81a95feea0e8c0c8c8a3cc86169b9197 0012-fix-getservby-_r-result-pointer-value-on-error.patch -df3b0c794c65b228c2f1246244ee913fbf5be1c20529ca7a3f87aceea4f8756f 0013-fix-strftime-y-for-negative-tm_year.patch -992d3f9cf5e380bdf31bb2fe52c6ed34642073539930023e1e964a23f498d73a 0014-fix-missing-integer-overflow-checks-in-regexec-buffe.patch -cbd3d60695a46c51e48d59260702029211c09be54b97ed73172e5c46f9604ec3 0015-fix-regexec-with-haystack-strings-longer-than-INT_MA.patch -79ac2d68335a42289783b0fe54e4634b23950ccd24c3a21b51f1243a985f18f3 0016-fix-integer-overflow-in-float-printf-needed-precisio.patch -ad4be27fa0bfbfc655d3d697457f64a785dcddb29784391891b612356c4a85f3 0017-fix-integer-overflows-and-uncaught-EOVERFLOW-in-prin.patch -6362fdd50e7a36d4a640d84faa5f65b4837f1c70ed0441076e59d596f7c839fe 0018-fix-clock_nanosleep-error-case.patch -f252aba723f2438ee1e9ee0940aed0017511dcb6d749bf6be7afdeaea4c782a5 0018-use-dynamic-buffer-for-getmntent.patch -a85b33f81034e3d801f2bdee5bc5ed85226dce49a652df59e436a45ed35a4701 0019-add-pthread_setname_np.patch -532dbff98f04ab4e76195ecbfce3e10bd4cc3df9f1e4f4080ad1090345f8c584 0020-fix-float-formatting-of-some-exact-halfway-cases.patch -1a1ed8134e4f28188a91441862402258618fa68158bc07a7f7b83fb416c12c63 0021-fix-getopt_long_only-misinterpreting-as-an-option.patch -7c33515437030f7bc267376ef910630d7a05e66183473dd3b1cbabca8bf4e538 0022-fix-gratuitous-undefined-behavior-in-strptime.patch -6254a8ec59f756cc044303650c18e55cb0afe9e5a6027f871da6537cdb2b08c5 0023-fix-strtod-and-strtof-rounding-with-many-trailing-ze.patch -8e074fa0f9434a8818951a48df08510b8c10c44ea9732a919f893476618a576d 0024-fix-strtod-int-optimization-in-non-nearest-rounding-.patch -301c1a16a84ec4c071e8a61360e3d3a21eb71cfcda581448938c7f3c40e11c85 0025-fix-minor-problem-in-previous-strtod-non-nearest-rou.patch -3f5cc9aede03bf2357b9cb3a2107b63dacb67c65c98eb71815658bbf6fab7528 0026-fix-typo-in-utmpx.h.patch -41769360683b537de93d1e6119059a0d39bd369fd34338cd81f32276ee670a1b 0027-fix-misspelling-of-a-legacy-macro-name-in-sys-param..patch -7ab31334e4b5d522cc9ed1e16b74c7cec7e4ca58a05aa56092d8dd9649a8a66d 0028-fix-parsing-of-quoted-time-zone-names.patch -c66310e6dc429ba8a0fac52a2918609c21b2fc7aab2a2b06108617d127f376e8 0029-fix-accidental-global-static-pointer-in-ldso.patch -9342ff13b01c12e3d2acd6faf7350c75048fb6a749610d98ee4994e16e829849 0030-fix-ldso-reserved-library-name-handling.patch -5964976ebdda4e0ac99cc1323de02ef3a737d9be3d08ea66973020fb85283c98 0031-fix-integer-overflow-of-tm_year-in-__secs_to_tm.patch -21bdaa2f602e898cbc665d4223c37316c3da45a27c4a56e2278a2d671a5da273 0032-fix-swprintf-internal-buffer-state-and-error-handlin.patch -8603df3a8a487c070a5642f8a497e6e32ae6f319352627b3644d3ab1f9ef78b7 0033-work-around-gdb-issues-recognizing-sigreturn-trampol.patch -96d3819f23f4f13a2c0c628070bfceedd90266f86154e09c6aa109f3a8a019ed 0034-fix-mrand48-jrand48-return-value-on-64-bit-archs.patch -f45ddc4958b1d1615462926363b2fed0a7b69492ec9541da36a4314c7a04797a 0035-handle-and-in-BRE-subexpression-start-and-end-as-anc.patch -0403509c71580be517867be56b984359c3e7c413aba3f5b7f5b29d52561be328 1001-add-support-for-pthread_-get-set-attr_default_np-GNU.patch +sha256sums="937185a5e5d721050306cf106507a006c3f1f86d86cd550024ea7be909071011 musl-1.1.16.tar.gz b4a2c06db38742e8c42c3c9838b285a7d8cdac6c091ff3df5ff9a15f1e41b9c7 ldconfig 299a7d75a09de3e2e11e7fb4acc3182e4a14e868093d2f30938fce9bfcff13da __stack_chk_fail_local.c d87d0cbb3690ae2c5d8cc218349fd8278b93855dd625deaf7ae50e320aad247c getconf.c b323f20c9bf560a13c877eb05428bc4a203383697bac763e7b12865db5c5922c getent.c f79a2930a2e5bb0624321589edf8b889d1e9b603e01e6b7ae214616605b3fdd7 iconv.c" -sha512sums="9e923572c0d6bad3dc2d2646d4b0699c10b477ce6300ac6c6224895192a90667f581ddf6eda2ab8c4c16f47bde4bccb03bb90478638d136d9df721430f4d0163 musl-1.1.15.tar.gz -1a74d5f5e0f6f2fe6029ed0f18b4603f80c990f19aa13d83c5d1f40f032b2ffb3819aae13ae1f96415bb08571774eec164e71d09028f2a5db4ae9b77e48cafe7 0001-fix-asctime-day-month-names-not-to-vary-by-locale.patch -6ed71298ce739a4bc150a2e5f26a1c7fd285474d6fc919ef46b62e558cce0b6e81230b1cdfede461b0986644dcabec5c2380da9eeac8d97a15c5dd28d1cde9bf 0001-verify-that-ttyname-refers-to-the-same-file-as-the-f.patch -7a3e572ea60930ac4d177461c07bedaaa1dfcc7de946c17e0b588eb7bffb7295500aec4b723090cbbb49b1a941717ada7578e09d5590b121b4472135bc5d4dd5 0002-math-fix-128bit-long-double-inverse-trigonometric-fu.patch -e9fb5df57a21936c3b5036ffdb07cc0573b8ef131354645ba9014105daec14255deaf9595bd7e1bc900105a8feb80338daafb45b4a17406477a330d2946ad0a8 0003-fix-FFSYNC-by-changing-it-to-O_SYNC.patch -03e088bd22bfa2f88331bcdf0f00e2d77dea75352bded6d4770c3c57d3cfe35803c158e102fa46f12659422cb04fdf77dc2f1906191e6b242d43cf38fbd9e65b 0004-getdtablesize-fix-returning-hard-instead-of-soft-rli.patch -d0c5e3e51513073c56f859ca56b99402be0e7166a008be5c1d5ef2ceda9f2fb22e21d5da151aa0ba2656662fd14e0ec733779b3701183295760f7e2d3e3d794f 0005-restore-_Noreturn-to-__assert_fail.patch -f48e2abfc8283762b975c659825b71314252da645a184a8caede542fd12e331943c24abda4f6530d2756ff2403e25587957b41acbb563a2a8b8e5f4e5b24cbf3 0006-fix-printf-regression-with-alt-form-octal-zero-flag-.patch -057a424aea8dd74bea86d1d19bfe51a928e317931e00703467f8f7e4d1ab4df1993bb6309b41e124ca91cb52846bcb6f828b949413dcc80163aee3b22e662442 0007-fix-ifru_data-and-ifcu_buf-types-in-net-if.h.patch -2780f433c74a812362f38c6259a9c0df7ac95fe45c619dfe4cf1dd65059cfc146e7cadb75659840fdf4217bc558a72dcbe3a6fa19a7936c676c01f054b25df53 0008-fix-if_indextoname-error-case.patch -4713bc28f805ce6b4d9752aaf3c1e263ab62398ec062ba5f36201d3a5095b180a412262056c6d8bc43880bdc64a83017350a86c8bc64bedf1d0c44267bb715af 0009-add-missing-_unlocked-and-wcsftime_l-prototypes-to-w.patch -6ad28ad6e60a2574b7b233af5ffe36c958a00ccda9c12d1ce94d3e8ac25647da34c7238962858d1aa6a3639bc24238f7adff202e6e69e3f9cf51bd73c4a53036 0010-simplify-refactor-fflush-and-make-fflush_unlocked-an.patch -68cd55a3d8a3f003675f296980d28cd4724ce30f86c46f8ec0054e65c6e78810e42c8e8a01d392493be0c925b3049bbc5855fd00618380daea16985077a8c85a 0011-fix-undefined-behavior-in-sched.h-cpu_set_t-usage.patch -aa3f86355ec1a66405219308aa5ee21860e033020f7c73371da25e6e9bdf582d5c92b9afc9fc421cb9102a7903d7366fe55bcd38e0ec35e24c2b295f2fdf442d 0012-fix-getservby-_r-result-pointer-value-on-error.patch -542fa5545bacc2801f0ee24cbdd66a8b6f20543ef4c7f20df78a6d5f9fc59bbebad8e0a7debe43e1cae93642c093e55900b77e372fc2d9ad67559bc61ed6730b 0013-fix-strftime-y-for-negative-tm_year.patch -589b14e47395acfcb8a0958f94fc28af1cbbc2c7fb51a0789a2520ffdd0d40cd6cfebef748cf395080d5988c2be204036d72d717f938eefa4630db98db2273c2 0014-fix-missing-integer-overflow-checks-in-regexec-buffe.patch -5c8fe2d829f57d652307fe9bba3e834bfdc2fbd8d3e39cd4b37317af7c432df9ca91036ca201cc6360044785c56103e949efc835aae607c0ba26f3deba037687 0015-fix-regexec-with-haystack-strings-longer-than-INT_MA.patch -fb8eb9533b4104dba23e07761d5a86c0820b4836b4cb42084dec87e9c445548e61f108a4a03249665d381d41adc6a67e8ea89ddcdbdec842ab95a17a147b52e9 0016-fix-integer-overflow-in-float-printf-needed-precisio.patch -c70434513ae1543392d5cd2ccd9ddee0537aa591d284a9911eb9e7a6c0cbb0b801dcb88a876aeffb48d034b5cd4d825ee4ae1ae2e4ff37155b5c09cc98ce2475 0017-fix-integer-overflows-and-uncaught-EOVERFLOW-in-prin.patch -e2f824959524453faeab09cff815e5885ed2d9a68a42ad3c605800daf514754715f52dd22d84146841f70be14fb79feb0ee7dbc51ce03e168db1c49f93dc96f6 0018-fix-clock_nanosleep-error-case.patch -1c5a27a75be2220cb9b63074a4730f219d3cbef1d4a2e6b68f96340c5b7bf838390f3526df7654226ac3eae4381db3f63261fb9ac3efc837cec0bde4e3615fb1 0018-use-dynamic-buffer-for-getmntent.patch -5e905b988bae134083bea9487781207ec1fc42e6d2ca16f73cd545f3a4eb15108aa60c7dba47a73147d2bf90377a870c5b912e69381754eff8e424df887bc6a8 0019-add-pthread_setname_np.patch -1a22787f197fcdaf484391f659b033ece296c3e8c3faa92411acd8b7f6f859bda8bc19abdd15fcb5840abe4da32c51ac57691e3c78b8717a96795f765fe8de6e 0020-fix-float-formatting-of-some-exact-halfway-cases.patch -ffada28865028b059ca64dc24538db8786465830a227443a410ee7ba7ea06e8dae352a26e268be5ba4a91059d2fe2dfacdfb9ce03c4df08a98df76aa1c4f7ca8 0021-fix-getopt_long_only-misinterpreting-as-an-option.patch -d8aeffd16ca5df51d34341f92a452941daf94c69b112d74f4759773301c2753f9dde5858b0b102954202a8af568a9f8193d775260da75d6389fe50dd8c15d57b 0022-fix-gratuitous-undefined-behavior-in-strptime.patch -fe86988734ce3817182c25023ed2739c67f3d4c226570c1162713ea5849112cb98b6f9b778ecedafd086366b01392dbc0a871e427a51a8421949a64a97fd8214 0023-fix-strtod-and-strtof-rounding-with-many-trailing-ze.patch -3df8546a37467b716509bc0bbccef47aaf431e861442267aba0c08e19980d411f515d6a9c09c86b055dc709e83bcfab5f8bbfcb34d5c4b62e201a555839ff1fb 0024-fix-strtod-int-optimization-in-non-nearest-rounding-.patch -cc15bb90009ae546f3de75457fef6ea8bdccee2bacae9a1c3860a18120cbd610f2f1d4a358a41da25b7d16f3ae03fe9b40b235c9028af5319dc1bcc28d3a956f 0025-fix-minor-problem-in-previous-strtod-non-nearest-rou.patch -1b4c3b7042f9b7f4ebb4d7dc8a6acac20326797e66583873c1de7bdcb08333a6f883196d6f4fdf364cd78c97093a4f90ebbeff8029aba3759fa358a2f99edc3b 0026-fix-typo-in-utmpx.h.patch -02663915628523be2340898984c363da6cc7f648c79c4f1d0ecd3a3e7f79a1b91b0ca6c0c4174cc993abc9a612d1dd68c8b4978192c7325c47706e0b0e13ca39 0027-fix-misspelling-of-a-legacy-macro-name-in-sys-param..patch -1ccdf7d82536023e494c000d2e5449ada3ec4a637e6f409d223c72251d76649af6545c44d2054acd5a373d739df1941933303b1eeabf7bccd20ae67724fa75d1 0028-fix-parsing-of-quoted-time-zone-names.patch -e681cea8cb009661f3869faab1d6a8415c39553865fe0f13fff0e4c60b682871d4dda4645fcbb148172c7d89ab1efb7e284b4e83a49a242e0d3425f09093b04d 0029-fix-accidental-global-static-pointer-in-ldso.patch -b3d68205157480a5527f98f2382fe4a6a7fbc218fc0c73c7797058ba481e1ca534c2f40d4b2e5eaa3dd7413301c89843b30cd4fcdf370f4cd833fbacb8fb43f3 0030-fix-ldso-reserved-library-name-handling.patch -2784ab0539fa00a743a9eaf7cd4f45b0021313b728bfe53af8fd76e6925a04ffd6f1008a9258f3949a6d33d18b8d143d2163935aae4889f299a34a6388992588 0031-fix-integer-overflow-of-tm_year-in-__secs_to_tm.patch -4e483752f3b84ac343045d214d7e4c495167cb56586ce456173a044b5c1c578ef34bde959da111ee4d599fda37065f002d88490f9923cd1c23324fabf29f25d7 0032-fix-swprintf-internal-buffer-state-and-error-handlin.patch -a3d8d416c3109c5c9e81b7229718255695082c502e3890e12573ed7820eec657061416d6025d3cd1c8ad1ae5ccff88cb76765475b63ce9406588e2e655780deb 0033-work-around-gdb-issues-recognizing-sigreturn-trampol.patch -84fc4f47651f1db66a4dc6bca050c55f2fb034e2d95fad94a440104cdd21610279b1f2f6d76f6fa048d0d9e951ca4950d194a1b063411a7b88eb2fe6577ef379 0034-fix-mrand48-jrand48-return-value-on-64-bit-archs.patch -35390e0971e8ae6e9d30c790dca5950f5db22e23d1fe3801f7227ed8da04691356304c1202a4694b9965b39eb8fcc01edfece04c58a347719a902bd548501fb2 0035-handle-and-in-BRE-subexpression-start-and-end-as-anc.patch -dc15dcb71e576f42268721c1caa036d91f3f67ab628a8527cd80d5689acea326b27e73013c02383b432027bed4c68c2cba75020088b760fae64d1680febf7a7d 1001-add-support-for-pthread_-get-set-attr_default_np-GNU.patch +sha512sums="47c00e50b7605102fb4aebe1f9ba9db94d26fac64805f6d744c9c557a05b8a58dff7f9558ff7c8d66b5d7c43740cdc2dd79448bacac47f1414e6ada99c210140 musl-1.1.16.tar.gz 8d3a2d5315fc56fee7da9abb8b89bb38c6046c33d154c10d168fb35bfde6b0cf9f13042a3bceee34daf091bc409d699223735dcf19f382eeee1f6be34154f26f ldconfig 062bb49fa54839010acd4af113e20f7263dde1c8a2ca359b5fb2661ef9ed9d84a0f7c3bc10c25dcfa10bb3c5a4874588dff636ac43d5dbb3d748d75400756d0b __stack_chk_fail_local.c 0d80f37b34a35e3d14b012257c50862dfeb9d2c81139ea2dfa101d981d093b009b9fa450ba27a708ac59377a48626971dfc58e20a3799084a65777a0c32cbc7d getconf.c |