|
Message-ID: <fc13f251-29fb-1e56-8b30-89afc0515e85@bell-sw.com> Date: Wed, 8 Jul 2020 11:59:16 +0300 From: Alexander Scherbatiy <alexander.scherbatiy@...l-sw.com> To: musl@...ts.openwall.com Subject: pthread_getspecific(3) with negative key Hello, The pthread_getspecific(3) specification describes: "The pthread_getspecific() function shall return the thread-specific data value associated with the given key. If no thread-specific data value is associated with key, then the value NULL shall be returned. " The glibc version pthread_getspecific(3) returns NULL for the negative key value. The musl version does not check key bounds [1]. Is it intentional behavior? [1] https://git.musl-libc.org/cgit/musl/tree/src/thread/pthread_getspecific.c#n7 Thanks, Alexander.
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.