The GNU CPU_ALLOC/CPU_ALLOC_SIZE/CPU_FREE extensions are broken. They result in a fixed-size array being used as a variable-size array...
-
-
Replying to @CopperheadOS
Going to work around this in Bionic by changing `struct { type __bits[size]; }` to `struct { union { type _min[size]; type __bits[0]; }; }`.
1 reply 0 retweets 0 likes -
Replying to @CopperheadOS
It's not possible to use a standard flexible length array member. Not sure if there's a way to solve this problem with only standard C...
1 reply 0 retweets 0 likes -
Replying to @CopperheadOS
Simple to fix - just don't use the cpu_set_t type except as an abstract pointer type. Cast to unsigned long * to access.
1 reply 0 retweets 2 likes -
Replying to @RichFelker @CopperheadOS
For objects obtained by malloc, casting pointer to cpu_set_t * does not set effective type. Only accessing via the type does.
1 reply 0 retweets 0 likes -
Replying to @RichFelker @CopperheadOS
I'll make this fix in
@musllibc too.1 reply 0 retweets 0 likes -
Replying to @RichFelker @musllibc
FWIW, Clang's -fsanitize=bounds is what caught this and should catch it with glibc and musl too. GCC doesn't seem to.
1 reply 0 retweets 0 likes
Fixed in @musllibc: https://git.musl-libc.org/cgit/musl/commit/?id=66570ec9c465e3c6c5d6dbd7dd42e45041a39288 …
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.