Created attachment 1451986 [details] c++ file to reproduce the problem Description of problem: Version-Release number of selected component (if applicable): gcc --version gcc (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5) How reproducible: always, easy Steps to Reproduce: 1. g++ -std=c++17 a.cpp 2. ./a.out 3. Actual results: BEFORE s0 = hello world s1 = hello world s2 = hello world AFTER modifying s1 s0 = ello world expecting = hello world s1 = ello world expecting = ello world s2 = ello world expecting = hello world Expected results: BEFORE s0 = hello world s1 = hello world s2 = hello world AFTER modifying s1 s0 = hello world expecting = hello world s1 = ello world expecting = ello world s2 = hello world expecting = hello world Additional info:
Hello, as an additional hint: this bug does not happen with gcc7.3.0 on Ubuntu 18.04 (version gcc (Ubuntu 7.3.0-16ubuntu3) 7.3.0) Best regards, Hubert Krause
That's only because Ubuntu's GCC defaults to -D_GLIBCXX_USE_CXX11_ABI=1 and RHEL DTS defaults to -D_GLIBCXX_USE_CXX11_ABI=0 The exact same bug is present in Ubuntu. It's now been fixed upstream.
Fixed in DTS 8: # g++ d.cc -std=c++17 -D_GLIBCXX_USE_CXX11_ABI=1; ./a.out # g++ d.cc -std=c++17 -D_GLIBCXX_USE_CXX11_ABI=0; ./a.out
VERIFIED for devtoolset-8-gcc-8.2.1-3.
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://access.redhat.com/errata/RHBA-2018:3562