This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/35935] New: abi breakage in search (4.0.0 -> 4.2.1)


>From http://gcc.gnu.org/ml/libstdc++/2008-04/msg00034.html

In gcc-4.0.0 search was instantiated in string-inst.cc:

 // Used in str::find.
 template
   const C*
   search(const C*, const C*, const C*, const C*, bool(*)(const C&, const C&));

and if a user compiled their code with -frepo, they can wind up with an
external reference to this, that is bound to the shared library for libstdc++
for 4.0.0.  Now, fast forward to 4.2.1. It cleverly removes the instantiation
for this and the users application no longer works.  I think this should
reproduce on any target that uses config/abi/pre/gnu.ver.


The fix seems to be to add std::search* back to
libstdc++-v3/config/abi/pre/gnu.ver and

    template
    const C*
    search(const C*, const C*, const C*, const C*, bool(*)(const C&, const
C&));

back to libstdc++-v3/src/string-inst.cc, to undo the abi break caused by:

------------------------------------------------------------------------
r101112 | bkoz | 2005-06-16 16:30:55 -0700 (Thu, 16 Jun 2005) | 61 lines


2005-06-17 Jakub Jelinek <jakub@redhat.com>

        * config/abi/ia64-linux-gnu/baseline_symbols.txt: Update.
        * config/abi/s390x-linux-gnu/baseline_symbols.txt: Update.
        * config/abi/s390-linux-gnu/baseline_symbols.txt: Update.
        * config/abi/x86_64-linux-gnu/baseline_symbols.txt: Update.
        * config/abi/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
        * config/abi/powerpc-linux-gnu/baseline_symbols.txt: Update.
        * config/abi/i486-linux-gnu/baseline_symbols.txt: Update.
        * config/abi/i386-linux-gnu/baseline_symbols.txt: Update.
        * config/abi/powerpc64-linux-gnu/baseline_symbols.txt: New file.
        * config/abi/powerpc64-linux-gnu/32/baseline_symbols.txt: New file.

2005-06-16 Jakub Jelinek <jakub@redhat.com>

        * src/compatibility.cc: Include bits/c++config.h first.
        (_GLIBCXX_SYMVER_COMPATIBILITY): Define if _GLIBCXX_SYMVER
        and PIC are both defined.
        * include/bits/char_traits.h (char_traits::eq): Rename
        only if _GLIBCXX_SYMVER_COMPATIBILITY is defined.

2005-06-16 Jakub Jelinek <jakub@redhat.com>

* acinclude.m4 ((GLIBCXX_ENABLE_SYMVERS): Rename _GLIBCXX_SIZE_T_IS_INT
to _GLIBCXX_SIZE_T_IS_UINT. Define _GLIBCXX_PTRDIFF_T_IS_INT.
* configure: Regenerate.
* config.h.in: Regenerate.
* src/compatibility.cc (istream:ignore(streamsize)): Use
_GLIBCXX_PTRDIFF_T_IS_INT instead of _GLIBCXX_SIZE_T_IS_INT.
* config/abi/compatibility.h: Rename _GLIBCXX_SIZE_T_IS_INT
to _GLIBCXX_SIZE_T_IS_UINT. Use _GLIBCXX_PTRDIFF_T_IS_INT
instead for symbols with streamsize arguments.

2005-06-16 Jakub Jelinek <jakub@redhat.com>

        * config/linker-map.gnu: Also export
        _ZNSt13basic_istreamIwSt11char_traitsIwEE6ignoreE[il][il].

2005-06-15 Benjamin Kosnik <bkoz@redhat.com>

        * configure.ac (libtool_VERSION): To 6:5:0.
        * configure: Regenerate.
        * config/linker-map.gnu: Edit.
        * src/istream.cc: Move istream::ignore(streamsize) specializations...
        * src/compatibility.cc: ...here. New.
        * include/bits/char_traits.h (char_traits::eq): Rename when
        appropriate.
        * acinclude.m4 (GLIBCXX_ENABLE_SYMVERS): Define _GLIBCXX_SIZE_T_IS_INT.
        Bump glibcxx_min_gnu_ld_version to 21590.
        * configure: Regenerate.
        * acconfig.h: Remove _GLIBCXX_ASM_SYMVER.
        * config.h.in: Regenerate.
        * src/Makefile.am (sources): Add compatibility.cc.
        * src/Makefile.in: Regenerate.
        * include/Makefile.am (host_headers_noinst): Add compatibility.h.
        * include/Makefile.in: Regenerate.
        * testsuite/testsuite_abi.h (symbol): Add data members.
        * testsuite/testsuite_abi.cc (check_version): Add GLIBCXX_3.4.5.
        Remove deprecated versions. Do a better job version checking.

------------------------------------------------------------------------


-- 
           Summary: abi breakage in search (4.0.0 -> 4.2.1)
           Product: gcc
           Version: 4.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: mrs at apple dot com
  GCC host triplet: i686-apple-darwin9
GCC target triplet: i686-apple-darwin9


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35935


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]