This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/11952] glibc may use uninitialized DTV slot, return NULL for &thread_local


------- 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]