On Fri, Aug 16, 2013 at 12:29 PM, Jonathan Sauer <[email protected]>wrote:

> Hello,
>
> > Another approach I'd be comfortable with would be to perform a second
> pass looking for a string match if the pointer match fails, and to emit a
> differently-worded message in that case (explaining that the problem might
> be due to an RTLD_LOCAL library, or using hidden visibility for the type,
> or linking against code produced by a compiler that violates the ABI).
>
> +1. Isn't the case of two different type_info objects for the same type a
> violation of ODR anyway
> (i.e. wouldn't this be something the UB sanitizer should check for)?


An ODR violation is one way you can get to this situation, yes. I don't
think it's reasonable to apply the ODR to hidden entities in separate DSOs
(whether they're hidden through visibility or RTLD_LOCAL) though, because
those mechanisms give more guarantees than the C++ standard provides. So I
don't think we can argue that this is /always/ an ODR violation.
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to