aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2016-09-19 11:15:51 -0400
committerRich Felker <dalias@aerifal.cx>2016-09-19 11:15:51 -0400
commit66570ec9c465e3c6c5d6dbd7dd42e45041a39288 (patch)
tree3c51235653f22dd24eb5ffc2afc4398348758ffa /src
parentsimplify/refactor fflush and make fflush_unlocked an alias for fflush (diff)
downloadgrovel-66570ec9c465e3c6c5d6dbd7dd42e45041a39288.tar.gz
grovel-66570ec9c465e3c6c5d6dbd7dd42e45041a39288.tar.xz
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 *.
Diffstat (limited to 'src')
0 files changed, 0 insertions, 0 deletions