This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/23628] Typeinfo comparison code easily breaks shared libs
- From: "rjohnson at dogstar-interactive dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 21 Jan 2006 21:02:52 -0000
- Subject: [Bug c++/23628] Typeinfo comparison code easily breaks shared libs
- References: <bug-23628-10681@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #26 from rjohnson at dogstar-interactive dot com 2006-01-21 21:02 -------
I just got bit by this using
gcc version 4.0.3 20051201 (prerelease) (Debian 4.0.2-5) (powerpc)
It's just my $.02 from the gallery, but that address comparison in the
type_info::oprator==() implementation looks suspect. Stroustrup (3rd edition,
$15.4.4) specifically says:
It is _not_ guaranteed that there is only one type_info object for each type in
the system.
and then he goes on to call out dynamically linked libraries as a particular
case.
If folks are interested, I can propose a relatively inexpensive (i.e.
non-strcmp) runtime strawman for consideration.
--
rjohnson at dogstar-interactive dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rjohnson at dogstar-
| |interactive dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23628