[llvm-bugs] [Bug 26785] New: is_equal failure with GCC shared libraries
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Mar 1 02:24:26 PST 2016
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: unassignedbugs at nondot.org
Reporter: rianquinn at gmail.com
CC: llvm-bugs at lists.llvm.org, mclow.lists at gmail.com
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160301/1ec024af/attachment.html>
More information about the llvm-bugs
mailing list