Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Jul 2015 12:57:40 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-standards@FreeBSD.org
Subject:   [Bug 201784] [libcxxrt] C++ dynamic_cast does not recognize same types across dynamically loaded modules when downcasting
Message-ID:  <bug-201784-15-D6QZvP00QD@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-201784-15@https.bugs.freebsd.org/bugzilla/>
References:  <bug-201784-15@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D201784

--- Comment #8 from Dimitry Andric <dim@FreeBSD.org> ---
(In reply to Marcin Cie=C5=9Blak from comment #6)
> By the way, our <bsd.lib.mk> always uses ${CC} when linking shared library
> (and it's silenced with @). Is this okay for C++ libs?

Not if you specify the lib using LIB_CXX, like in the libatf-c++ Makefile:

LIB_CXX=3D atf-c++

We used to do a 'deep' comparison of the typeinfo earlier, but only in head
from r256642 onwards, and we eventually reverted it in r278010.  As J=C3=B6=
rg
Sonnenberger noted in a private mail conversation:

"... there are three different problematic situations:

(1) A type is used in the main program and it is linked without
-rdynamic.

(2) A type is used by two different DSOs and both are loaded with
RTLD_LOCAL.

(3) Two independent types of the same name are defined in two different
DSOs.

The hack makes the first two work to a degree and fails misserable on
the last. IMO (2) and (3) should be considered the same and (1) is just
a bug."

(N.B.: with 'the hack' he meant doing the deep comparison.)

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-201784-15-D6QZvP00QD>