[PATCH] libstdc++: Fix duplicated export on basic_string::_M_disjunct on Solaris.
Tomasz Kaminski
tkaminsk@redhat.com
Fri Apr 10 06:22:29 GMT 2026
On Thu, Apr 9, 2026 at 2:39 AM Tomasz Kamiński <tkaminsk@redhat.com> wrote:
> The patterns for cow_string that were split to exclude starts_with,
> ends_with, did not include name starting with _:
> _ZNKSs[0-9][0-9][a-z]*;
> _ZNKSbIwSt11char_traitsIwESaIwEE[0-9][0-9][a-z]*;
>
> This was not caught on x86_64-linux as _M_disjunt was already exported
> in 3.4 version (when HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT
> is defined).
>
> libstdc++-v3/ChangeLog:
>
> * config/abi/pre/gnu.ver (GLIBCXX_3.4): Remove _ZNKSs11_[MS]_*
> and _ZNKSbIwSt11char_traitsIwESaIwEE11_[MS]_* patterns.
> ---
> I got this patterns wrong, because SSO string pattern includes _M_disjunct,
> and I have seen this funciton being exported in 3.4 version on linux.
>
For reference it was exported in 3.4 here:
#ifdef HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT
# GLIBCXX_ABI compatibility only.
# std::string
_ZNKSs11_M_disjunctEPKc;
_ZNKSs15_M_check_lengthE[jmy][jmy]PKc;
>
> Tested on x86_64-linux (check-abi and baseline). Rainer confirmed it fixes
> Solaris. OK for trunk?
>
> libstdc++-v3/config/abi/pre/gnu.ver | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/libstdc++-v3/config/abi/pre/gnu.ver
> b/libstdc++-v3/config/abi/pre/gnu.ver
> index 2ff2aa02383..624de951d41 100644
> --- a/libstdc++-v3/config/abi/pre/gnu.ver
> +++ b/libstdc++-v3/config/abi/pre/gnu.ver
> @@ -270,7 +270,6 @@ GLIBCXX_3.4 {
> _ZNKSs[5-9][a-b]*;
> _ZNKSs[0-8][d-e]*;
> _ZNKSs[0-9][g-z]*;
> - _ZNKSs11_[MS]_*;
> _ZNKSs1[2-8][a-z]*;
> _ZNKSs[2-9][0-9][a-z]*;
> _ZNKSs4find*;
> @@ -343,7 +342,6 @@ GLIBCXX_3.4 {
> _ZNKSbIwSt11char_traitsIwESaIwEE[5-9][a-b]*;
> _ZNKSbIwSt11char_traitsIwESaIwEE[0-8][d-e]*;
> _ZNKSbIwSt11char_traitsIwESaIwEE[0-9][g-z]*;
> - _ZNKSbIwSt11char_traitsIwESaIwEE11_[MS]_*;
> _ZNKSbIwSt11char_traitsIwESaIwEE1[2-8][a-z]*;
> _ZNKSbIwSt11char_traitsIwESaIwEE[2-9][0-9][a-z]*;
> _ZNKSbIwSt11char_traitsIwESaIwEE[abd-z]*;
> --
> 2.53.0
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://gcc.gnu.org/pipermail/libstdc++/attachments/20260410/d71e27ec/attachment.htm>
More information about the Libstdc++
mailing list