public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "neleai at seznam dot cz" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sourceware.org
Subject: [Bug libc/15607] Add threadsafe version of getenv()
Date: Mon, 14 Oct 2013 18:51:00 -0000 [thread overview]
Message-ID: <bug-15607-131-plF68xPC50@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-15607-131@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=15607
Ondrej Bilka <neleai at seznam dot cz> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |neleai at seznam dot cz
--- Comment #7 from Ondrej Bilka <neleai at seznam dot cz> ---
A setenv does locking, you could try to send a patch that adds locking to
getenv.
> Note that, if others do end up deeming it desirable to change glibc, the
> appropriate change would be having setenv do the above-described atomic
> replacement and simply leak the old environment.
> This would be fully safe with no locking.
A atomic part is already done. For leaking part you have problem with current
code:
/* We allocated this space; we can extend it. */
new_environ = (char **) realloc (last_environ,
(size + 2) * sizeof (char *));
which you would need to change to standard doubling of sizes.
--
You are receiving this mail because:
You are on the CC list for the bug.
next prev parent reply other threads:[~2013-10-14 18:51 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-12 14:45 [Bug libc/15607] New: " hadess at hadess dot net
2013-06-12 14:55 ` [Bug libc/15607] " ondra at iuuk dot mff.cuni.cz
2013-06-12 14:58 ` jakub at redhat dot com
2013-06-12 15:06 ` hadess at hadess dot net
2013-06-12 18:34 ` bugdal at aerifal dot cx
2013-06-13 8:06 ` hadess at hadess dot net
2013-06-13 9:06 ` hadess at hadess dot net
2013-10-14 18:51 ` neleai at seznam dot cz [this message]
2014-02-16 19:42 ` jackie.rosen at hushmail dot com
2014-05-28 19:41 ` schwab at sourceware dot org
2014-06-13 15:08 ` fweimer at redhat dot com
2014-06-13 15:08 ` fweimer at redhat dot com
2015-05-14 1:22 ` walters at verbum dot org
2015-07-11 20:51 ` neleai at seznam dot cz
2021-12-29 16:43 ` crrodriguez at opensuse dot org
2024-01-16 16:20 ` jwakely.gcc at gmail dot com
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-15607-131-plF68xPC50@http.sourceware.org/bugzilla/ \
--to=sourceware-bugzilla@sourceware.org \
--cc=glibc-bugs@sourceware.org \
/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.
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).