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.
-D_GLIBCXX_USE_CXX11_ABI=0 is an ABI changing option, so you can only use it in programs where all the C++ code has been compiled with that option, or with libraries like libstdc++.so.6 which do support both ABIs.
That is not the case in your testcase, the libboost_system.so and libboost_filesystem.so libraries are most likely built with the default C++ ABI on RHEL8, so -D_GLIBCXX_USE_CXX11_ABI=1.
This is not a bug, for the reasons Jakub said. The RHEL8 system libraries (including Boost) use the new ABI, so you cannot expect them to work correctly when you use a different ABI.
Description of problem: An C++ executable compiled with -D_GLIBCXX_USE_CXX11_ABI=0 crashes whereas with -D_GLIBCXX_USE_CXX11_ABI=1 (RHEL 8.1 default) does not: Version-Release number of selected component (if applicable): gcc version 8.3.1 20190507 (Red Hat 8.3.1-4) (GCC) Steps to Reproduce: test.cpp: #include <boost/filesystem/path.hpp> #include <iostream> int main(int argc, char* argv[]) { std::cout << "_GLIBCXX_USE_CXX11_ABI=" << _GLIBCXX_USE_CXX11_ABI << std::endl; std::cout << "sizeof(boost::filesystem::path)=" << sizeof(boost::filesystem::path) << std::endl; std::cout << boost::filesystem::path(argv[0]).filename().string() << std::endl; return 0; } $ g++ -D_GLIBCXX_USE_CXX11_ABI=1 -lboost_system -lboost_filesystem test.cpp; ./a.out _GLIBCXX_USE_CXX11_ABI=1 sizeof(boost::filesystem::path)=32 a.out $ g++ -D_GLIBCXX_USE_CXX11_ABI=0 -lboost_system -lboost_filesystem test.cpp; ./a.out _GLIBCXX_USE_CXX11_ABI=0 sizeof(boost::filesystem::path)=8 Segmentation fault (core dumped) Actual results: Segmentation fault (core dumped) Expected results: No segfault