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 1243366 - Wrong behaviour of basic_streambuf symbols defined in libstdc++.so
Summary: Wrong behaviour of basic_streambuf symbols defined in libstdc++.so
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: gcc
Version: 7.2
Hardware: All
OS: Linux
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Jakub Jelinek
QA Contact: Miroslav Franc
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-07-15 10:07 UTC by Jonathan Wakely
Modified: 2016-02-01 02:30 UTC (History)
4 users (show)

Fixed In Version: gcc-4.8.5-4.el7
Doc Type: Bug Fix
Doc Text:
No description necessary
Clone Of:
Environment:
Last Closed: 2015-11-19 12:23:02 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Patch to fix streambuf copies in gcc-4.8 (937 bytes, patch)
2015-07-15 14:59 UTC, Jonathan Wakely
no flags Details | Diff
Patch to fix streambuf copies in gcc-4.4 (942 bytes, patch)
2015-07-15 15:00 UTC, Jonathan Wakely
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:2080 0 normal SHIPPED_LIVE gcc bug fix and enhancement update 2015-11-19 10:51:58 UTC

Description Jonathan Wakely 2015-07-15 10:07:33 UTC
Libstdc++ exports the following symbols:

_ZNSt15basic_streambufIcSt11char_traitsIcEEC1ERKS2_@@GLIBCXX_3.4
_ZNSt15basic_streambufIcSt11char_traitsIcEEC2ERKS2_@@GLIBCXX_3.4
_ZNSt15basic_streambufIcSt11char_traitsIcEEaSERKS2_@@GLIBCXX_3.4
_ZNSt15basic_streambufIwSt11char_traitsIwEEC1ERKS2_@@GLIBCXX_3.4
_ZNSt15basic_streambufIwSt11char_traitsIwEEC2ERKS2_@@GLIBCXX_3.4
_ZNSt15basic_streambufIwSt11char_traitsIwEEaSERKS2_@@GLIBCXX_3.4

These are the copy constructor and copy assignment operator for std::streambuf and std::wstreambuf. Although those functions are defined they don't have sensible definitions e.g. the assignment operator doesn't update any members:

      __streambuf_type&
      operator=(const __streambuf_type&) { return *this; };

Prior to gcc-5 those functions are 'private' and are never used, so the symbols are redundant, and it's not a problem that the functions have the wrong semantics (in retrospect it would have been better to declare them private but not define them at all, so the symbols would not have been in libstdc++.so).

In C++11 basic_streambuf is copyable, so when using gcc-5 from DTS-4 code might require the copy constructor and assignment operator. However, that code will find the exported symbols in the system libstdc++.so, and those symbols don't have sensible definitions.

By applying a patch to the RHEL system GCC we can ensure that the symbols defined in the library have the correct semantics for C++11 code built with DTS-4. That change would have no impact on code built with the system compiler or DTS-3, because such code never uses those symbols anyway.

Changing the definition of these symbols would fix these failing tests when using devtoolset:

27_io/basic_fstream/assign/1.cc execution test
27_io/basic_ifstream/assign/1.cc execution test
27_io/basic_istringstream/assign/1.cc execution test
27_io/basic_istringstream/cons/move.cc execution test
27_io/basic_ofstream/assign/1.cc execution test
27_io/basic_ostringstream/assign/1.cc execution test
27_io/basic_streambuf/cons/57394.cc execution test
27_io/basic_stringstream/assign/1.cc execution test

Comment 3 Jonathan Wakely 2015-07-15 14:59:17 UTC
Created attachment 1052377 [details]
Patch to fix streambuf copies in gcc-4.8

Comment 4 Jonathan Wakely 2015-07-15 15:00:11 UTC
Created attachment 1052378 [details]
Patch to fix streambuf copies in gcc-4.4

Comment 8 errata-xmlrpc 2015-11-19 12:23:02 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-2080.html


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