[Bug 221423] gcc std::locale(LocaleName) crashes instead of throwing an exception

From: <bugzilla-noreply_at_freebsd.org>
Date: Fri, 08 Apr 2022 20:51:34 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=221423

--- Comment #34 from Mark Millard <marklmi26-fbsd@yahoo.com> ---
(In reply to Konstantin Belousov from comment #24)

The following 6 line c++ program is sufficient to demonstrate
the __unordtf2@GCC_4.5.0 binding failure when targeting
aarch64:

# more fp-binding-failure-aarch64.cpp
#include <cmath>
volatile long double v=NAN;
int main()
{
    return std::isnan(v) ? 1 : 0;
}

# g++11 fp-binding-failure-aarch64.cpp
# ./a.out
ld-elf.so.1: /lib/libgcc_s.so.1: version GCC_4.5.0 required by
/usr/home/root/c_tests/a.out not found

Note that the complaint is not about a reference in
/usr/local/lib/gcc11/libstdc++.so.6 but about the
a.out that has its own reference to __unordtf2@GCC_4.5.0 :

# nm -a a.out | grep '@GCC_[4-9]\.' | more
                 U __unordtf2@GCC_4.5.0

For reference . . .

# ldd a.out
a.out:
        libstdc++.so.6 => /usr/local/lib/gcc11/libstdc++.so.6 (0x83000000)
        libm.so.5 => /lib/libm.so.5 (0x81834000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x8275a000)
        libc.so.7 => /lib/libc.so.7 (0x845f3000)

-- 
You are receiving this mail because:
You are the assignee for the bug.