summaryrefslogtreecommitdiff
path: root/test/pthread/ex8-mtx-odd.c
AgeCommit message (Collapse)Author
2016-05-31linuxthreads.old: Fix segfault when pthread_mutex_unlock() called against ↵Leonid Lisovskiy
unlocked NORMAL mutex. Althought, it is undefined behavior, there is no reason for segfault. Program received signal SIGSEGV, Segmentation fault. __pthread_unlock (lock=lock@entry=0x804b03c <lock+16>) at libpthread/linuxthreads.old/spinlock.c:231 231 (&lock->__status, oldstatus, (long)(thr->p_nextlock) & ~1L)) It occurs only on platforms which has HAS_COMPARE_AND_SWAP defined. Restore glibc commit fbaf6e72d6 "spinlock.c (__pthread_unlock): Don't crash if called for an untaken mutex." behavior, broken later by commit 4ad1d0cfbf. Signed-off-by: Leonid Lisovskiy <lly.dev@gmail.com>