tzset generates ThreadSanitizer warnings if TZ not set
Bug #2036420 reported by
Fredrik Arnerup
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
glibc (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
A program that calls tzset (e.g. via mktime) from multiple threads will generate ThreadSanitizer warnings, but only if the environment variable TZ is not set. Please see attached example.
Not sure if it is a glibc bug or a limitation in ThreadSanitizer.
$ lsb_release -rd
Description: Ubuntu 22.04.3 LTS
Release: 22.04
$ apt-cache policy libc6
libc6:
Installed: 2.35-0ubuntu3.1
Candidate: 2.35-0ubuntu3.1
Version table:
*** 2.35-0ubuntu3.1 500
500 http://
100 /var/lib/
2.35-0ubuntu3 500
500 http://
To post a comment you must log in.
Might be a false positive. AFAICT this warns about writing to old_tz, which AFAICT is always dealt with under the tzset_lock except in __libc_ tzset_freemem which I'm guessing is only ran when the main thread exits.