Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
DescriptionJonathan 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
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
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