public inbox for glibc-bugs@sourceware.org help / color / mirror / Atom feed
From: "mol at astron dot nl" <sourceware-bugzilla@sourceware.org> To: glibc-bugs@sources.redhat.com Subject: [Bug libc/13271] getaddrinfo is not thread safe Date: Fri, 07 Oct 2011 17:49:00 -0000 [thread overview] Message-ID: <bug-13271-131-IBfbpEQZCQ@http.sourceware.org/bugzilla/> (raw) In-Reply-To: <bug-13271-131@http.sourceware.org/bugzilla/> http://sourceware.org/bugzilla/show_bug.cgi?id=13271 --- Comment #5 from Jan David Mol <mol at astron dot nl> 2011-10-07 17:49:35 UTC --- The reason I report this is because I saw my application crash repeatedly in a validly used getaddrinfo, because another thread invalidated environ through setenv. I've since replaced the setenv call, but what worries me is that nothing in the documentation of glibc or POSIX could have indicated for me that this could happen. Although I personally would consider a function only thread safe if no valid use can cause undefined behaviour due to multithreaded use, I do recognise that in this case practicality is important to consider. After all, dropping support for the environment variables used in getaddrinfo and other functions, or wrapping getenv with the same lock that setenv already has, might not be desirable either. Since you are the devs and not me, it is up to you, but I kindly request that you reopen this bug as a documentation one at least. The setenv man page family could carry a warning indicating that it makes the behaviour of concurrently running thread-safe (glibc) functions undefined? -- Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
next prev parent reply other threads:[~2011-10-07 17:49 UTC|newest] Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top 2011-10-07 8:26 [Bug libc/13271] New: " mol at astron dot nl 2011-10-07 12:29 ` [Bug libc/13271] " bugdal at aerifal dot cx 2011-10-07 14:44 ` drepper.fsp at gmail dot com 2011-10-07 14:58 ` mol at astron dot nl 2011-10-07 16:30 ` bugdal at aerifal dot cx 2011-10-07 17:49 ` mol at astron dot nl [this message] 2011-10-07 18:52 ` bugdal at aerifal dot cx 2011-10-12 8:21 ` mol at astron dot nl 2011-10-15 13:58 ` drepper.fsp at gmail dot com 2011-10-15 20:56 ` bugdal at aerifal dot cx 2011-10-15 22:43 ` drepper.fsp at gmail dot com 2011-10-16 3:19 ` bugdal at aerifal dot cx 2014-02-16 17:43 ` jackie.rosen at hushmail dot com 2014-05-28 19:44 ` schwab at sourceware dot org 2014-06-27 11:56 ` fweimer at redhat dot com 2015-03-23 15:25 ` carlos at redhat dot com 2015-03-23 15:26 ` [Bug libc/13271] getaddrinfo is not thread safe against concurrent setenv carlos at redhat dot com 2015-07-11 20:51 ` neleai at seznam dot cz
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=bug-13271-131-IBfbpEQZCQ@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=glibc-bugs@sources.redhat.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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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 read-only IMAP folder(s) and NNTP newsgroup(s).