public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug dynamic-link/18383] New: TLS blocks with very large alignment not handled right
@ 2015-05-06 20:26 roland at gnu dot org
  2015-06-03  0:20 ` [Bug dynamic-link/18383] " roland at gnu dot org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: roland at gnu dot org @ 2015-05-06 20:26 UTC (permalink / raw)
  To: glibc-bugs

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

            Bug ID: 18383
           Summary: TLS blocks with very large alignment not handled right
           Product: glibc
           Version: 2.21
            Status: NEW
          Severity: normal
          Priority: P2
         Component: dynamic-link
          Assignee: unassigned at sourceware dot org
          Reporter: roland at gnu dot org
  Target Milestone: ---

I'm going to add the test case to the test suite momentarily, so I won't
attach it here.

The test case contains:
        static __thread int tdata1 = 1;
        static __thread int tdata2 __attribute__ ((aligned (0x10))) = 2;
        static __thread int tdata3 __attribute__ ((aligned (0x1000))) = 4;
        static __thread int tbss1;
        static __thread int tbss2 __attribute__ ((aligned (0x10)));
        static __thread int tbss3 __attribute__ ((aligned (0x1000)));

On arm-linux-gnueabihf, tdata3 comes out with bad alignment and not
initialized with the right value and tbss3 comes out with bad alignment.
It's the same in the dynamic and static versions of the case.

On x86_64-linux-gnu, the dynamic version works right but the static version
crashes in startup.

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


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

* [Bug dynamic-link/18383] TLS blocks with very large alignment not handled right
  2015-05-06 20:26 [Bug dynamic-link/18383] New: TLS blocks with very large alignment not handled right roland at gnu dot org
@ 2015-06-03  0:20 ` roland at gnu dot org
  2015-06-24 23:32 ` cvs-commit at gcc dot gnu.org
  2015-07-08 22:03 ` roland at gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: roland at gnu dot org @ 2015-06-03  0:20 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #1 from Roland McGrath <roland at gnu dot org> ---
This now has test cases elf/tst-tlsalign{,-extern}{,-static} in the tree.
The ARM failures appear to be an assembler bug:
https://sourceware.org/bugzilla/show_bug.cgi?id=18481

There are failures on x86 which are not yet explained.

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


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

* [Bug dynamic-link/18383] TLS blocks with very large alignment not handled right
  2015-05-06 20:26 [Bug dynamic-link/18383] New: TLS blocks with very large alignment not handled right roland at gnu dot org
  2015-06-03  0:20 ` [Bug dynamic-link/18383] " roland at gnu dot org
@ 2015-06-24 23:32 ` cvs-commit at gcc dot gnu.org
  2015-07-08 22:03 ` roland at gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2015-06-24 23:32 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #2 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  a7fcc2f8edb26e4d54b6a740aaa3f3bb0caebd14 (commit)
      from  f9536db79065ad00efd877b4d80a1dd06938bd0a (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=a7fcc2f8edb26e4d54b6a740aaa3f3bb0caebd14

commit a7fcc2f8edb26e4d54b6a740aaa3f3bb0caebd14
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Thu May 7 13:26:34 2015 -0700

    Align TCB offset to the maximum alignment

    We need to align TCB offset to the maximum alignment for TLS_TCB_AT_TP
    targets, as _dl_allocate_tls_storage (in elf/dl-tls.c) does using
    __libc_memalign and dl_tls_static_align.

        [BZ #18383]
        * csu/libc-tls.c (__libc_setup_tls) [TLS_TCB_AT_TP]: Align
        TCB_OFFSET to MAX_ALIGN, not just TCBALIGN.  Add comment.
        * elf/Makefile (test-xfail-tst-tlsalign{,-static}): Remove
        comment for i386/x86-64.
        (test-xfail-tst-tlsalign-extern-static): Removed.

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog      |    9 +++++++++
 csu/libc-tls.c |    5 ++++-
 elf/Makefile   |    5 +----
 3 files changed, 14 insertions(+), 5 deletions(-)

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


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

* [Bug dynamic-link/18383] TLS blocks with very large alignment not handled right
  2015-05-06 20:26 [Bug dynamic-link/18383] New: TLS blocks with very large alignment not handled right roland at gnu dot org
  2015-06-03  0:20 ` [Bug dynamic-link/18383] " roland at gnu dot org
  2015-06-24 23:32 ` cvs-commit at gcc dot gnu.org
@ 2015-07-08 22:03 ` roland at gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: roland at gnu dot org @ 2015-07-08 22:03 UTC (permalink / raw)
  To: glibc-bugs

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

Roland McGrath <roland at gnu dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #3 from Roland McGrath <roland at gnu dot org> ---
The only known libc bug here was the x86 case shown fixed in comment#2.
The libc test suite now expects the ARM failures when the known assembler bug
(bug #18481) is detected.

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


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

end of thread, other threads:[~2015-07-08 22:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-06 20:26 [Bug dynamic-link/18383] New: TLS blocks with very large alignment not handled right roland at gnu dot org
2015-06-03  0:20 ` [Bug dynamic-link/18383] " roland at gnu dot org
2015-06-24 23:32 ` cvs-commit at gcc dot gnu.org
2015-07-08 22:03 ` roland at gnu dot org

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