From: Alexander Scherbatiy <alexander.scherbatiy@bell-sw.com>
To: musl@lists.openwall.com
Subject: [musl] pthread_getspecific(3) with negative key
Date: Wed, 8 Jul 2020 11:59:16 +0300 [thread overview]
Message-ID: <fc13f251-29fb-1e56-8b30-89afc0515e85@bell-sw.com> (raw)
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.
next reply other threads:[~2020-07-08 8:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-08 8:59 Alexander Scherbatiy [this message]
2020-07-08 10:40 ` Florian Weimer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=fc13f251-29fb-1e56-8b30-89afc0515e85@bell-sw.com \
--to=alexander.scherbatiy@bell-sw.com \
--cc=musl@lists.openwall.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).