aboutsummaryrefslogtreecommitdiffstats
path: root/toolchain/musl/patches/033-fix-undefined-behavior-in-sched.h-cpu_set_t-usage.patch
diff options
context:
space:
mode:
authorChristian Lamparter <chunkeey@googlemail.com>2017-01-03 17:51:04 +0100
committerFelix Fietkau <nbd@nbd.name>2017-01-16 20:40:00 +0100
commita8a5cb9595cd64a48c1cea6a1478c11e022474a9 (patch)
treeea0417332a8bbea1bc2b1d2e810044558c54da51 /toolchain/musl/patches/033-fix-undefined-behavior-in-sched.h-cpu_set_t-usage.patch
parentda5d060ac9171029cfde61ee45aa417696e45da0 (diff)
downloadupstream-a8a5cb9595cd64a48c1cea6a1478c11e022474a9.tar.gz
upstream-a8a5cb9595cd64a48c1cea6a1478c11e022474a9.tar.bz2
upstream-a8a5cb9595cd64a48c1cea6a1478c11e022474a9.zip
musl: update musl to 1.1.16+ and switch to download from git
This patch updates musl to 1.1.16+ [0] and removes all the backported patches. This is a major release and tagged as such. For more information visit musl-libc.org or read the WHATSNEW. Furthermore, this patch also changes musl to download directly from git. This makes it easier to update musl in the future. The patch custom Add-format-attribute-to-some-function-declarations.patch was assigned a new 400- number. This should avoid confusion since 0xx numbers are usually assigned to backports. [0] <http://git.musl-libc.org/cgit/musl/commit/?id=769f53598e781ffc89191520f3f8a93cb58db91f> Cc: Hannu Nyman <hannu.nyman@iki.fi> Cc: Koen Vandeputte <koen.vandeputte@ncentric.com> Cc: Jo-Philipp Wich <jo@mein.io> Cc: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Diffstat (limited to 'toolchain/musl/patches/033-fix-undefined-behavior-in-sched.h-cpu_set_t-usage.patch')
-rw-r--r--toolchain/musl/patches/033-fix-undefined-behavior-in-sched.h-cpu_set_t-usage.patch43
1 files changed, 0 insertions, 43 deletions
diff --git a/toolchain/musl/patches/033-fix-undefined-behavior-in-sched.h-cpu_set_t-usage.patch b/toolchain/musl/patches/033-fix-undefined-behavior-in-sched.h-cpu_set_t-usage.patch
deleted file mode 100644
index c634d59e4b..0000000000
--- a/toolchain/musl/patches/033-fix-undefined-behavior-in-sched.h-cpu_set_t-usage.patch
+++ /dev/null
@@ -1,43 +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: 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, &)
---
-cgit v0.11.2