musl/arch/x32
Rich Felker 3c43c0761e fix missing synchronization in atomic store on i386 and x86_64
despite being strongly ordered, the x86 memory model does not preclude
reordering of loads across earlier stores. while a plain store
suffices as a release barrier, we actually need a full barrier, since
users of a_store subsequently load a waiter count to determine whether
to issue a futex wait, and using a stale count will result in soft
(fail-to-wake) deadlocks. these deadlocks were observed in malloc and
possible with stdio locks and other libc-internal locking.

on i386, an atomic operation on the caller's stack is used as the
barrier rather than performing the store itself using xchg; this
avoids the need to read the cache line on which the store is being
performed. mfence is used on x86_64 where it's always available, and
could be used on i386 with the appropriate cpu model checks if it's
shown to perform better.
2015-07-28 18:40:18 +00:00
..
bits move O_PATH definition back to arch bits 2015-04-01 19:31:06 -04:00
src fix dangling pointers in x32 syscall timespec fixup code 2015-05-01 21:22:27 -04:00
atomic.h fix missing synchronization in atomic store on i386 and x86_64 2015-07-28 18:40:18 +00:00
crt_arch.h dynamic linker bootstrap overhaul 2015-04-13 03:04:42 -04:00
pthread_arch.h fix stack protector crashes on x32 & powerpc due to misplaced TLS canary 2015-05-06 18:37:19 -04:00
reloc.h fix breakage in x32 dynamic linker due to mismatching register size 2015-04-20 18:17:48 -04:00
syscall_arch.h fix dangling pointers in x32 syscall timespec fixup code 2015-05-01 21:22:27 -04:00