This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/11952] glibc may use uninitialized DTV slot, return NULL for &thread_local
- From: "ppluzhnikov at google dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 16 Sep 2010 20:39:19 -0000
- Subject: [Bug libc/11952] glibc may use uninitialized DTV slot, return NULL for &thread_local
- References: <20100827191037.11952.ppluzhnikov@google.com>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- Additional Comments From ppluzhnikov at google dot com 2010-09-16 20:39 -------
(In reply to comment #4)
> Running over a list twice with two short
> loops is much slower than running over them once with a combined loop body.
After the patch, the second loop executes only until we've accounted for all
"broken" (i.e. non-PIC but using TLS) DSOs.
So in the usual (non-broken) case tls_counter == 0 and there is no additional
cost (that I can see).
In the broken case,
A) who cares -- the user should just use PIC; and
B) we stop the second loop as soon as we can (when tls_counter reaches 0), which
can still be the entire list in the worst case, but likely much sooner in practice.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=11952
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.