This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug nptl/17561] New: GLIBC 2.20 results in SIGILL on x86_64 with double pthread_rwlock_unlock()


https://sourceware.org/bugzilla/show_bug.cgi?id=17561

            Bug ID: 17561
           Summary: GLIBC 2.20 results in SIGILL on x86_64 with double
                    pthread_rwlock_unlock()
           Product: glibc
           Version: 2.20
            Status: NEW
          Severity: normal
          Priority: P2
         Component: nptl
          Assignee: unassigned at sourceware dot org
          Reporter: aaro.koskinen at iki dot fi
                CC: drepper.fsp at gmail dot com

The following program fails with illegal instruction on x86_64 on HW where
_xend() is not supported (even if it would the behaviour is not probably
correct):

$ cat foo.c
#include <pthread.h>
#include <stdio.h>

int main(void)
{
        pthread_rwlock_t _lock;

        pthread_rwlock_init(&_lock, 0);
        pthread_rwlock_wrlock(&_lock);
        pthread_rwlock_unlock(&_lock);
        pthread_rwlock_unlock(&_lock);
        pthread_rwlock_destroy(&_lock);
        return 0;
}
$ gcc foo.c -lpthread
$ ./a.out
Illegal instruction

This is caused by __pthread_rwlock_unlock() -> ELIDE_UNLOCK() -> _xend()

-- 
You are receiving this mail because:
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]