https://llvm.org/bugs/show_bug.cgi?id=26785
Bug ID: 26785
Summary: is_equal failure with GCC shared libraries
Product: libc++abi
Version: unspecified
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: All Bugs
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]
Classification: Unclassified
Libcxxabi does not appear to properly handle typeinfo when working across
multiple shared libraries compiled using GCC. The issue I am having is throwing
an exception in one shared library, and catching in another, but I also noticed
that dynamic_cast has the same issue (cast from a different shared library). In
both cases they fail.
At the very top of private_typeinfo.cpp, there is the following function:
is_equal(const std::type_info* x, const std::type_info* y, bool use_strcmp)
{
#ifndef _WIN32
if (!use_strcmp)
return x == y;
return strcmp(x->name(), y->name()) == 0;
#else
return (x == y) || (strcmp(x->name(), y->name()) == 0);
#endif
}
If I modify this code such that, it thinks it's Windows the problem goes away
(i.e. it always performs the strcmp if needed). I am currently using the latest
GCC (5.3) and the latest libcxxabi (master - head).
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs