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
-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.
Invalid code, closing.