Go to file
Rich Felker 882aedf6a1 fix lost or delayed wakes in sem_post under certain race conditions
if sem_post is interrupted between clearing the waiters bit from the
semaphore value and performing the futex wait operation, subsequent
calls to sem_post will not perform a wake operation unless a new
waiter has arrived.

usually, this is at most a minor nuisance, since the original wake
operation will eventually happen. however, it's possible that the wake
is delayed indefinitely if interrupted by a signal handler, or that
the address the wake needs to be performed on is no longer mapped if
the semaphore was a process-shared one that has since been unmapped
but has a waiter on a different mapping of the same semaphore. this
can happen when another thread using the same mapping "steals the
post" atomically before actually becoming a second waiter, deduces
from success that it was the last user of the semaphore mapping, then
re-posts and unmaps the semaphore mapping. this scenario was described
in a report by Markus Wichmann.

instead of checking only the waiters bit, also check the waiter count
that was sampled before the atomic post operation, and perform the
wake if it's nonzero. this will not produce any additional wakes under
non-race conditions, since the waiters bit only becomes zero when
targeting a single waiter for wake. checking both was already the
behavior prior to commit 159d1f6c02.
2024-08-10 16:30:28 -04:00
arch m68k: fix POLLWRNORM and POLLWRBAND 2024-08-09 23:07:04 -04:00
compat/time32 remove LFS64 symbol aliases; replace with dynamic linker remapping 2022-10-19 14:01:31 -04:00
crt aarch64 crti.o: fix alignment of _init/_fini 2024-05-12 12:17:13 -04:00
dist add another example option to dist/config.mak 2012-04-24 16:49:11 -04:00
include syslog: revert LOG_FAC/LOG_FACMASK changes 2024-07-05 13:22:25 -04:00
ldso dynlink: avoid copying to temp buffer in get_lfs64 2024-06-22 16:54:11 -04:00
src fix lost or delayed wakes in sem_post under certain race conditions 2024-08-10 16:30:28 -04:00
tools install.sh: avoid creating symlinks with restricted permissions 2024-02-03 19:57:30 -05:00
.gitignore remove obsolete gitignore rules 2016-07-06 00:21:25 -04:00
.mailmap update contributor name 2019-12-07 12:21:35 -05:00
configure configure: enable riscv32 port 2024-02-29 16:59:06 -05:00
COPYRIGHT add optimized aarch64 memcpy and memset 2020-06-26 17:49:51 -04:00
dynamic.list fix regression in access to optopt object 2018-11-19 13:20:41 -05:00
INSTALL update INSTALL file archs list with riscv32, loongarch64 additions 2024-02-29 19:23:03 -05:00
Makefile fix missing make dependency for Scrt1.o due to typo 2024-08-09 23:03:52 -04:00
README update version reference in the README file 2014-06-25 14:16:53 -04:00
VERSION release 1.2.5 2024-02-29 21:07:33 -05:00
WHATSNEW release 1.2.5 2024-02-29 21:07:33 -05:00

    musl libc

musl, pronounced like the word "mussel", is an MIT-licensed
implementation of the standard C library targetting the Linux syscall
API, suitable for use in a wide range of deployment environments. musl
offers efficient static and dynamic linking support, lightweight code
and low runtime overhead, strong fail-safe guarantees under correct
usage, and correctness in the sense of standards conformance and
safety. musl is built on the principle that these goals are best
achieved through simple code that is easy to understand and maintain.

The 1.1 release series for musl features coverage for all interfaces
defined in ISO C99 and POSIX 2008 base, along with a number of
non-standardized interfaces for compatibility with Linux, BSD, and
glibc functionality.

For basic installation instructions, see the included INSTALL file.
Information on full musl-targeted compiler toolchains, system
bootstrapping, and Linux distributions built on musl can be found on
the project website:

    http://www.musl-libc.org/