public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/14898] New: Unable to create small static TLS block in shared library
@ 2012-11-30 17:12 bramesh.dev at gmail dot com
  2012-11-30 17:25 ` [Bug libc/14898] " carlos_odonell at mentor dot com
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: bramesh.dev at gmail dot com @ 2012-11-30 17:12 UTC (permalink / raw)
  To: glibc-bugs

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

             Bug #: 14898
           Summary: Unable to create small static TLS block in shared
                    library
           Product: glibc
           Version: 2.15
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
        AssignedTo: unassigned@sourceware.org
        ReportedBy: bramesh.dev@gmail.com
                CC: drepper.fsp@gmail.com
    Classification: Unclassified


Created attachment 6766
  --> http://sourceware.org/bugzilla/attachment.cgi?id=6766
tarball to reproduce bug

If shared library declease a single TLS global variable of size 1 (one) byte,
and this TLS variable is accessed by the binary linking against it the shared
library doesnt get loaded because there is an error creating the static TLS
block. The attached test case shows both the failed and expected behavior.

Untar the files from the tar ball. To reproduce the bug please compile the
shared library as follows:

libfoo:
gcc -g -Wall -Wextra -fPIC -pthread -shared -DBUG -o libfoo.so  foo.c

test:
gcc -g -Wall -Wextra -DBUG -o test test.c -Wl,-rpath . -L . -lfoo

$ ./test
./test: error while loading shared libraries: ./libfoo.so: cannot allocate
memory in static TLS block

To get the expected behavior recompile the tests as follows

libfoo:
gcc -g -Wall -Wextra -fPIC -pthread -shared -o libfoo.so  foo.c

test:
gcc -g -Wall -Wextra -o test test.c -Wl,-rpath . -L . -lfoo

$ ./test
foo: 1
address of foo: 0x7f3d359c56fe

The behavior is same if the library is compiled without -pthread. I have tested
this bug in my system running Ubuntu precise using eglibc-2.15.

-- 
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] 15+ messages in thread

* [Bug libc/14898] Unable to create small static TLS block in shared library
  2012-11-30 17:12 [Bug libc/14898] New: Unable to create small static TLS block in shared library bramesh.dev at gmail dot com
@ 2012-11-30 17:25 ` carlos_odonell at mentor dot com
  2012-11-30 20:21 ` schwab@linux-m68k.org
                   ` (12 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: carlos_odonell at mentor dot com @ 2012-11-30 17:25 UTC (permalink / raw)
  To: glibc-bugs

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

Carlos O'Donell <carlos_odonell at mentor dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |carlos_odonell at mentor
                   |                            |dot com
   Target Milestone|---                         |2.18

-- 
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] 15+ messages in thread

* [Bug libc/14898] Unable to create small static TLS block in shared library
  2012-11-30 17:12 [Bug libc/14898] New: Unable to create small static TLS block in shared library bramesh.dev at gmail dot com
  2012-11-30 17:25 ` [Bug libc/14898] " carlos_odonell at mentor dot com
@ 2012-11-30 20:21 ` schwab@linux-m68k.org
  2012-12-02 23:05 ` maxim.kuvyrkov at gmail dot com
                   ` (11 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: schwab@linux-m68k.org @ 2012-11-30 20:21 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #1 from Andreas Schwab <schwab@linux-m68k.org> 2012-11-30 20:21:30 UTC ---
a45bd0d9682db986191b075e64bcacd038af5993 probably fixes that.

-- 
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] 15+ messages in thread

* [Bug libc/14898] Unable to create small static TLS block in shared library
  2012-11-30 17:12 [Bug libc/14898] New: Unable to create small static TLS block in shared library bramesh.dev at gmail dot com
  2012-11-30 17:25 ` [Bug libc/14898] " carlos_odonell at mentor dot com
  2012-11-30 20:21 ` schwab@linux-m68k.org
@ 2012-12-02 23:05 ` maxim.kuvyrkov at gmail dot com
  2012-12-04  0:01 ` carlos at systemhalted dot org
                   ` (10 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: maxim.kuvyrkov at gmail dot com @ 2012-12-02 23:05 UTC (permalink / raw)
  To: glibc-bugs

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

Maxim Kuvyrkov <maxim.kuvyrkov at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |maxim.kuvyrkov at gmail dot
                   |                            |com

-- 
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] 15+ messages in thread

* [Bug libc/14898] Unable to create small static TLS block in shared library
  2012-11-30 17:12 [Bug libc/14898] New: Unable to create small static TLS block in shared library bramesh.dev at gmail dot com
                   ` (2 preceding siblings ...)
  2012-12-02 23:05 ` maxim.kuvyrkov at gmail dot com
@ 2012-12-04  0:01 ` carlos at systemhalted dot org
  2012-12-04  2:40 ` maxim.kuvyrkov at gmail dot com
                   ` (9 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: carlos at systemhalted dot org @ 2012-12-04  0:01 UTC (permalink / raw)
  To: glibc-bugs

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

Carlos O'Donell <carlos at systemhalted dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|carlos_odonell at mentor    |carlos at systemhalted dot
                   |dot com                     |org

-- 
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] 15+ messages in thread

* [Bug libc/14898] Unable to create small static TLS block in shared library
  2012-11-30 17:12 [Bug libc/14898] New: Unable to create small static TLS block in shared library bramesh.dev at gmail dot com
                   ` (3 preceding siblings ...)
  2012-12-04  0:01 ` carlos at systemhalted dot org
@ 2012-12-04  2:40 ` maxim.kuvyrkov at gmail dot com
  2012-12-04  2:47 ` maxim.kuvyrkov at gmail dot com
                   ` (8 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: maxim.kuvyrkov at gmail dot com @ 2012-12-04  2:40 UTC (permalink / raw)
  To: glibc-bugs

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

Maxim Kuvyrkov <maxim.kuvyrkov at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|2.18                        |2.15.1

--- Comment #2 from Maxim Kuvyrkov <maxim.kuvyrkov at gmail dot com> 2012-12-04 02:39:41 UTC ---
This appears to be fixed in current mainline (tested on mips64-linux-gnu). 
Moving milestone to 2.15.1.

-- 
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] 15+ messages in thread

* [Bug libc/14898] Unable to create small static TLS block in shared library
  2012-11-30 17:12 [Bug libc/14898] New: Unable to create small static TLS block in shared library bramesh.dev at gmail dot com
                   ` (4 preceding siblings ...)
  2012-12-04  2:40 ` maxim.kuvyrkov at gmail dot com
@ 2012-12-04  2:47 ` maxim.kuvyrkov at gmail dot com
  2012-12-04  3:46 ` bramesh.dev at gmail dot com
                   ` (7 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: maxim.kuvyrkov at gmail dot com @ 2012-12-04  2:47 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #3 from Maxim Kuvyrkov <maxim.kuvyrkov at gmail dot com> 2012-12-04 02:46:50 UTC ---
Andreas,

Your commit a45bd0d9682db986191b075e64bcacd038af5993 is only on the Fedora
branch, yet I can't reproduce the problem with current sources.  Was the bug
fixed on trunk by a different patch?

-- 
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] 15+ messages in thread

* [Bug libc/14898] Unable to create small static TLS block in shared library
  2012-11-30 17:12 [Bug libc/14898] New: Unable to create small static TLS block in shared library bramesh.dev at gmail dot com
                   ` (5 preceding siblings ...)
  2012-12-04  2:47 ` maxim.kuvyrkov at gmail dot com
@ 2012-12-04  3:46 ` bramesh.dev at gmail dot com
  2012-12-04  9:23 ` schwab@linux-m68k.org
                   ` (6 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: bramesh.dev at gmail dot com @ 2012-12-04  3:46 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #4 from Bharath Ramesh <bramesh.dev at gmail dot com> 2012-12-04 03:45:09 UTC ---
I can reproduce this on a Centos 6.3 with glibc-2.12. I am trying to see if I
can get access to a FC17 workstation.

-- 
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] 15+ messages in thread

* [Bug libc/14898] Unable to create small static TLS block in shared library
  2012-11-30 17:12 [Bug libc/14898] New: Unable to create small static TLS block in shared library bramesh.dev at gmail dot com
                   ` (6 preceding siblings ...)
  2012-12-04  3:46 ` bramesh.dev at gmail dot com
@ 2012-12-04  9:23 ` schwab@linux-m68k.org
  2012-12-04 22:49 ` bramesh.dev at gmail dot com
                   ` (5 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: schwab@linux-m68k.org @ 2012-12-04  9:23 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #5 from Andreas Schwab <schwab@linux-m68k.org> 2012-12-04 09:22:23 UTC ---
(In reply to comment #3)
> yet I can't reproduce the problem with current sources.

I don't know what you tested, but the error is still present on master, and the
commit still fixes it.

-- 
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] 15+ messages in thread

* [Bug libc/14898] Unable to create small static TLS block in shared library
  2012-11-30 17:12 [Bug libc/14898] New: Unable to create small static TLS block in shared library bramesh.dev at gmail dot com
                   ` (7 preceding siblings ...)
  2012-12-04  9:23 ` schwab@linux-m68k.org
@ 2012-12-04 22:49 ` bramesh.dev at gmail dot com
  2012-12-05  6:24 ` maxim.kuvyrkov at gmail dot com
                   ` (4 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: bramesh.dev at gmail dot com @ 2012-12-04 22:49 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #6 from Bharath Ramesh <bramesh.dev at gmail dot com> 2012-12-04 22:48:33 UTC ---
I tested this in a newer version of ubuntu running eglibc-2.16 and the error
still exists. I will see if I can get access FC17 with glibc-2.15.

-- 
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] 15+ messages in thread

* [Bug libc/14898] Unable to create small static TLS block in shared library
  2012-11-30 17:12 [Bug libc/14898] New: Unable to create small static TLS block in shared library bramesh.dev at gmail dot com
                   ` (8 preceding siblings ...)
  2012-12-04 22:49 ` bramesh.dev at gmail dot com
@ 2012-12-05  6:24 ` maxim.kuvyrkov at gmail dot com
  2012-12-05 21:40 ` bramesh.dev at gmail dot com
                   ` (3 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: maxim.kuvyrkov at gmail dot com @ 2012-12-05  6:24 UTC (permalink / raw)
  To: glibc-bugs

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

Maxim Kuvyrkov <maxim.kuvyrkov at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|2.15.1                      |2.18

--- Comment #7 from Maxim Kuvyrkov <maxim.kuvyrkov at gmail dot com> 2012-12-05 06:24:13 UTC ---
Andreas,

Was your patch posted to libc-alpha@?

-- 
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] 15+ messages in thread

* [Bug libc/14898] Unable to create small static TLS block in shared library
  2012-11-30 17:12 [Bug libc/14898] New: Unable to create small static TLS block in shared library bramesh.dev at gmail dot com
                   ` (9 preceding siblings ...)
  2012-12-05  6:24 ` maxim.kuvyrkov at gmail dot com
@ 2012-12-05 21:40 ` bramesh.dev at gmail dot com
  2012-12-05 22:49 ` law at redhat dot com
                   ` (2 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: bramesh.dev at gmail dot com @ 2012-12-05 21:40 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #8 from Bharath Ramesh <bramesh.dev at gmail dot com> 2012-12-05 21:39:44 UTC ---
FC17 with glibc-2.15 doesnt have this issue.

-- 
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] 15+ messages in thread

* [Bug libc/14898] Unable to create small static TLS block in shared library
  2012-11-30 17:12 [Bug libc/14898] New: Unable to create small static TLS block in shared library bramesh.dev at gmail dot com
                   ` (10 preceding siblings ...)
  2012-12-05 21:40 ` bramesh.dev at gmail dot com
@ 2012-12-05 22:49 ` law at redhat dot com
  2013-01-14 14:13 ` schwab@linux-m68k.org
  2014-06-14  7:44 ` fweimer at redhat dot com
  13 siblings, 0 replies; 15+ messages in thread
From: law at redhat dot com @ 2012-12-05 22:49 UTC (permalink / raw)
  To: glibc-bugs

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

law at redhat dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |law at redhat dot com

--- Comment #9 from law at redhat dot com 2012-12-05 22:48:59 UTC ---
Bharath, that's because Fedora has included the patch posted by Andreas.

-- 
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] 15+ messages in thread

* [Bug libc/14898] Unable to create small static TLS block in shared library
  2012-11-30 17:12 [Bug libc/14898] New: Unable to create small static TLS block in shared library bramesh.dev at gmail dot com
                   ` (11 preceding siblings ...)
  2012-12-05 22:49 ` law at redhat dot com
@ 2013-01-14 14:13 ` schwab@linux-m68k.org
  2014-06-14  7:44 ` fweimer at redhat dot com
  13 siblings, 0 replies; 15+ messages in thread
From: schwab@linux-m68k.org @ 2013-01-14 14:13 UTC (permalink / raw)
  To: glibc-bugs

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

Andreas Schwab <schwab@linux-m68k.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|2.18                        |2.17

--- Comment #10 from Andreas Schwab <schwab@linux-m68k.org> 2013-01-14 14:12:38 UTC ---
Fixed in 2.17.

-- 
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] 15+ messages in thread

* [Bug libc/14898] Unable to create small static TLS block in shared library
  2012-11-30 17:12 [Bug libc/14898] New: Unable to create small static TLS block in shared library bramesh.dev at gmail dot com
                   ` (12 preceding siblings ...)
  2013-01-14 14:13 ` schwab@linux-m68k.org
@ 2014-06-14  7:44 ` fweimer at redhat dot com
  13 siblings, 0 replies; 15+ messages in thread
From: fweimer at redhat dot com @ 2014-06-14  7:44 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=14898

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
              Flags|                            |security-

-- 
You are receiving this mail because:
You are on the CC list for the bug.


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

end of thread, other threads:[~2014-06-14  7:44 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-30 17:12 [Bug libc/14898] New: Unable to create small static TLS block in shared library bramesh.dev at gmail dot com
2012-11-30 17:25 ` [Bug libc/14898] " carlos_odonell at mentor dot com
2012-11-30 20:21 ` schwab@linux-m68k.org
2012-12-02 23:05 ` maxim.kuvyrkov at gmail dot com
2012-12-04  0:01 ` carlos at systemhalted dot org
2012-12-04  2:40 ` maxim.kuvyrkov at gmail dot com
2012-12-04  2:47 ` maxim.kuvyrkov at gmail dot com
2012-12-04  3:46 ` bramesh.dev at gmail dot com
2012-12-04  9:23 ` schwab@linux-m68k.org
2012-12-04 22:49 ` bramesh.dev at gmail dot com
2012-12-05  6:24 ` maxim.kuvyrkov at gmail dot com
2012-12-05 21:40 ` bramesh.dev at gmail dot com
2012-12-05 22:49 ` law at redhat dot com
2013-01-14 14:13 ` schwab@linux-m68k.org
2014-06-14  7:44 ` 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).