This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug time/19179] New: gmtime_r internally calls getenv("TZ") which is not thread-safe
- From: "nszabolcs at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Wed, 28 Oct 2015 15:23:04 +0000
- Subject: [Bug time/19179] New: gmtime_r internally calls getenv("TZ") which is not thread-safe
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=19179
Bug ID: 19179
Summary: gmtime_r internally calls getenv("TZ") which is not
thread-safe
Product: glibc
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: time
Assignee: unassigned at sourceware dot org
Reporter: nszabolcs at gmail dot com
Target Milestone: ---
gmtime_r should be thread-safe, but it calls tzset_internal which calls
getenv("TZ") which is non-thread-safe.
a multi-threaded application may modify the TZ env var through the
environ pointer if there is no concurrent access to this env var in
other threads.
gmtime_r is not specified to access TZ, if it does, that can introduce
a data race in a conforming application and gmtime_r may misbehave if
it observes TZ in an inconsistent state.
--
You are receiving this mail because:
You are on the CC list for the bug.