This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/10320] erand48 implementation not thread safe but POSIX says it should be
- From: "simon at josefsson dot org" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Fri, 21 Dec 2012 08:12:50 +0000
- Subject: [Bug libc/10320] erand48 implementation not thread safe but POSIX says it should be
- Auto-submitted: auto-generated
- References: <bug-10320-131@http.sourceware.org/bugzilla/>
http://sourceware.org/bugzilla/show_bug.cgi?id=10320
--- Comment #6 from Simon Josefsson <simon at josefsson dot org> 2012-12-21 08:12:50 UTC ---
(In reply to comment #5)
> Can you clarify whether there is actually a bug here? POSIX says:
>
> The drand48(), lrand48(), and mrand48() functions need not be thread-safe.
>
> If you're claiming erand48, jrand48, and/or nrand48 also have thread-safety
> problems, please clarify that and explain what the problem is.
The problem should be completely described if you read the first two posts in
this report.
To summarize the current state:
* drand48, lrand48, mrand48 need not be thread-safe.
* erand48, jrand48, lcong48, nrand48, seed48, and srand48 ought to be
thread-safe, as far as I understand.
* The erand48, jrand48, lcong48, nrand48, seed48, and srand48 functions appears
to be thread unsafe in glibc, since they use a global variable.
The links into git posted in the first post (3 years ago) still works, if you
want to read the code.
/Simon
--
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.