https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83893
Bug ID: 83893 Summary: gnu.ver linker script has overly loose wildcard patterns Product: gcc Version: 8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: redi at gcc dot gnu.org Target Milestone: --- There is no reason to have patterns like these in the GLIBCXX_3.4 node in config/abi/pre/gnu.ver std::[ABD-Z]*; std::a[a-c]*; std::ad[a-n]*; std::ad[p-z]*; std::a[e-z]*; The only symbols that matches any of these are std::allocator specializations, so having the other patterns just risks unintentionally matching new symbols and giving them the wrong symbol version (e.g. see PR 83834). Tightening the patterns was attempted in r211355 but reverted due to PR 61536. We should revisit this in stage 1. For a start: --- a/libstdc++-v3/config/abi/pre/gnu.ver +++ b/libstdc++-v3/config/abi/pre/gnu.ver @@ -24,43 +24,25 @@ GLIBCXX_3.4 { # Names inside the 'extern' block are demangled names. extern "C++" { - std::[ABD-Z]*; - std::a[a-c]*; - std::ad[a-n]*; - std::ad[p-z]*; - std::a[e-z]*; -# std::ba[a-r]*; - std::basic_[a-e]*; - std::basic_f[a-h]*; +# std::adopt_lock; + std::allocator<char>::*; + std::allocator<wchar_t>::*; +# std::bad_*; # std::basic_filebuf; - std::basic_f[j-r]*; # std::basic_fstream; - std::basic_f[t-z]*; - std::basic_[g-h]*; - std::basic_i[a-e]*; # std::basic_ifstream; # std::basic_ios; # std::basic_iostream; - std::basic_istr[a-d]*; # std::basic_istream; # std::basic_istringstream; - std::basic_i[t-z]*; - std::basic_[j-n]*; - std::basic_o[a-e]*; # std::basic_ofstream; -# std::basic_o[g-z]*; - std::basic_o[g-r]*; - std::basic_ostr[a-d]*; +# std::basic_ostream; # std::basic_ostringstream; - std::basic_[p-r]*; # std::basic_streambuf # std::basic_string # std::basic_stringbuf # std::basic_stringstream; - std::basic_[t-z]*; - std::ba[t-z]*; - std::b[b-z]*; std::cerr; # std::char_traits; # std::c[i-z]*;