<html>
<head>
<base href="https://bugs.llvm.org/">
</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 - clang ODR checker errors on (real) ODR violation in libstdc++ headers"
href="https://bugs.llvm.org/show_bug.cgi?id=38920">38920</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>clang ODR checker errors on (real) ODR violation in libstdc++ headers
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Modules
</td>
</tr>
<tr>
<th>Assignee</th>
<td>rtrieu@google.com
</td>
</tr>
<tr>
<th>Reporter</th>
<td>richard-llvm@metafoo.co.uk
</td>
</tr>
<tr>
<th>CC</th>
<td>dgregor@apple.com, llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>Our libstdc++ / modules buildbot is currently failing due to the modules ODR
checker finding a ODR violation in a libstdc++ header:
<a href="http://lab.llvm.org:8011/builders/clang-x86_64-linux-selfhost-modules-2/builds/26164/steps/compile.llvm.stage2/logs/stdio">http://lab.llvm.org:8011/builders/clang-x86_64-linux-selfhost-modules-2/builds/26164/steps/compile.llvm.stage2/logs/stdio</a>
There is a real ODR violation in this code. std::_Sp_counted_base::_M_release
calls __gnu_cxx::__exchange_and_add_dispatch, which is declared static.
While this is a bug in libstdc++, we do aim to support libstdc++ regardless of
its bugs, and so we should work around this. Assuming the above ODR violation
is indeed the reason that the check is failing, we could special-case this
particular function name when computing ODR hashes, and ensure that it always
hashes to the same value even when resolving to two different functions in
different translation units.</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>