RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1468808 - gcc: Call __tls_get_addr with a properly aligned stack on x86-64
Summary: gcc: Call __tls_get_addr with a properly aligned stack on x86-64
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: gcc
Version: 7.4
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Marek Polacek
QA Contact: Michael Petlan
URL:
Whiteboard:
Depends On:
Blocks: 1473718
TreeView+ depends on / blocked
 
Reported: 2017-07-08 08:46 UTC by Florian Weimer
Modified: 2019-06-14 17:18 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-06-14 17:18:22 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
GNU Compiler Collection 58066 0 P3 RESOLVED __tls_get_addr is called with misaligned stack on x86-64 2020-04-25 15:38:38 UTC
Red Hat Bugzilla 1468807 0 unspecified CLOSED glibc: Support broken applications which call __tls_get_addr with an unaligned stack (GCC bug workaround) 2021-02-22 00:41:40 UTC

Internal Links: 1468807

Description Florian Weimer 2017-07-08 08:46:58 UTC
GCC generates code which calls __tls_get_addr with an unaligned stack, violating the x86-64 ABI.  We will compensate  for this in glibc, but the GCC bug should be fixed as well.

The upstream bug has a test case:

static __thread char ccc;
extern "C" void* __cxa_get_globals() throw()
{
 return &ccc;
}

  g++ -fPIC -S -O2 t.cc

results in:

__cxa_get_globals:
       leaq    _ZL3ccc@tlsld(%rip), %rdi
       call    __tls_get_addr@PLT
       addq    $_ZL3ccc@dtpoff, %rax
       ret

Comment 1 Marek Polacek 2017-10-11 11:30:26 UTC
I'm looking at the patches in PR58066 and it's not clear to me which ones need to be applied to fix this, but I'm nervous about backporting them.

Comment 7 Jeff Law 2019-06-14 17:18:22 UTC
This issue won't be fixed for RHEL 7, but it is fixed in RHEL 8.


Note You need to log in before you can comment on or make changes to this bug.