public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/12453] New: Broken thread local storage (TLS) initialization
@ 2011-01-30 15:16 Martin.vGagern at gmx dot net
  2011-01-30 17:25 ` [Bug libc/12453] " Martin.vGagern at gmx dot net
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: Martin.vGagern at gmx dot net @ 2011-01-30 15:16 UTC (permalink / raw)
  To: glibc-bugs

http://sourceware.org/bugzilla/show_bug.cgi?id=12453

           Summary: Broken thread local storage (TLS) initialization
           Product: glibc
           Version: 2.12
            Status: NEW
          Severity: critical
          Priority: P2
         Component: libc
        AssignedTo: drepper.fsp@gmail.com
        ReportedBy: Martin.vGagern@gmx.net


Created attachment 5218
  --> http://sourceware.org/bugzilla/attachment.cgi?id=5218
Script reproducing the issue

When dynamically loading a library along with several dependencies, calls to
_dl_add_to_slotinfo and _dl_update_slotinfo can become intermixed. As a
consequence, _dl_update_slotinfo will update the generation counter of the dtv
although not all of the slots belonging to that generation have been added.
Subsequent calls to _dl_add_to_slotinfo will add more slots to the same
generation, for which no storage will be allocated, as the dtv generation
checks will claim no work is necessary. This will lead to uninitialized dtv
entries and will likely cause a SIGSEGV when thread local variables are
accessed.

The attached script, when executed in an empty directory on a GNU/Linux x86_64
system, and probably under other circumstances as well, will demonstrate the
problem. It will print

./demo
&tbaz=(nil)
glibc-tls-bug.sh: line 75:  1752 Segmentation fault      "$@"

where you see that the address of the thread local variable tbaz is NULL, and
the referencing that variable causes a segmentation fault.

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


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2014-06-27 13:53 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-30 15:16 [Bug libc/12453] New: Broken thread local storage (TLS) initialization Martin.vGagern at gmx dot net
2011-01-30 17:25 ` [Bug libc/12453] " Martin.vGagern at gmx dot net
2011-01-30 18:11 ` Martin.vGagern at gmx dot net
2011-01-30 21:58 ` Martin.vGagern at gmx dot net
2011-02-11  9:35 ` Martin.vGagern at gmx dot net
2011-04-03  3:09 ` david.kirkby at onetel dot net
2011-04-03  7:28 ` Martin.vGagern at gmx dot net
2011-04-03  8:41 ` Martin.vGagern at gmx dot net
2011-05-15  1:27 ` drepper.fsp at gmail dot com
2011-05-15  1:33 ` drepper.fsp at gmail dot com
2014-06-27 13:53 ` fweimer at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).