[Bug 221423] gcc std::locale(LocaleName) crashes instead of throwing an exception
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Sun Aug 11 03:41:01 UTC 2019
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=221423
--- Comment #12 from Jan Beich <jbeich at FreeBSD.org> ---
(In reply to Walter Schwarzenfeld from comment #10)
> Is this still relevant?
std::locale test still fails on GCC < 6. As lang/gcc (i.e., g++ symlink) abides
by GCC_DEFAULT it's not an issue since bug 219275.
$ pkg install gcc48 gcc5 gcc6 gcc7 gcc8 gcc9
$ g++9 -Wl,-rpath=/usr/local/lib/gcc9 test.cpp
$ ./a.out
$ g++8 -Wl,-rpath=/usr/local/lib/gcc8 test.cpp
$ ./a.out
$ g++7 -Wl,-rpath=/usr/local/lib/gcc7 test.cpp
$ ./a.out
$ g++6 -Wl,-rpath=/usr/local/lib/gcc6 test.cpp
$ ./a.out
$ g++5 -Wl,-rpath=/usr/local/lib/gcc5 test.cpp
$./a.out
locale::facet::_S_create_c_locale name not valid
$ g++48 -Wl,-rpath=/usr/local/lib/gcc48 test.cpp
$ ./a.out
locale::facet::_S_create_c_locale name not valid
$ g++42 test.cpp
$ ./a.out
locale::facet::_S_create_c_locale name not valid
As for ABI mismatch between g++ and libstdc++ when -Wl,-rpath is not passed and
more than one lang/gcc* is installed it doesn't seem to crash on FreeBSD 11.3
or later.
$ uname -rp
11.2-RELEASE amd64
$ pkg install gcc48 gcc5 gcc6 gcc7 gcc8 gcc9
$ g++9 test.cpp
$ ./a.out
Abort trap
$ ldd ./a.out
./a.out:
libstdc++.so.6 => /usr/local/lib/gcc48/libstdc++.so.6 (0x800822000)
libm.so.5 => /lib/libm.so.5 (0x800b29000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x800d56000)
libc.so.7 => /lib/libc.so.7 (0x800f65000)
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-toolchain
mailing list