This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/4350] New: Reentrancy problem between strftime() and setenv()
- From: "pasky at suse dot cz" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 12 Apr 2007 13:42:40 -0000
- Subject: [Bug libc/4350] New: Reentrancy problem between strftime() and setenv()
- Reply-to: sourceware-bugzilla at sourceware dot org
Threaded programs may crash randomly if strftime() and setenv() aren't excluded
from being called in parallel, since getenv() is called from the inside of
strftime(). While getenv()-setenv() thread safety problems are documented, it is
not documented that time functions have these problems as well. The proposed
patch introduces getenv_r() as a reentrant version of getenv() and uses it from
inside of the time functions; maybe you'll choose a different approach (or a
different name for the function or so), but something should be done about this.
Also, maybe other parts of glibc making use of getenv() might need the same fix.
--
Summary: Reentrancy problem between strftime() and setenv()
Product: glibc
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: libc
AssignedTo: drepper at redhat dot com
ReportedBy: pasky at suse dot cz
CC: glibc-bugs at sources dot redhat dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=4350
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.