<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - is_equal failure with GCC shared libraries"
   href="https://llvm.org/bugs/show_bug.cgi?id=26785">26785</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>is_equal failure with GCC shared libraries
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libc++abi
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>All Bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>rianquinn@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org, mclow.lists@gmail.com
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>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).</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>