<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 - [feature request] sanitizer blacklist: specifying shared libraries"
   href="https://bugs.llvm.org/show_bug.cgi?id=33034">33034</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[feature request] sanitizer blacklist: specifying shared libraries
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

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

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </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>new bugs
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>jhi@iki.fi
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Hi, I am trying to use the clang memory sanitizer, and that has the
understandable-but-annoying requirement that the whole executable needs to be
msan-clean.  The libc wrapper helps for 90% of the pain, but I've run into the
10% -- an external third-party library triggers the wrath of the msan.

The current blacklisting functionality
(<a href="https://clang.llvm.org/docs/SanitizerSpecialCaseList.html">https://clang.llvm.org/docs/SanitizerSpecialCaseList.html</a>) allows one to
blacklist by source code path or by function name.

But in my case neither works: this external library is stripped of debug
symbols.  The only thing I know is the name of the shared object.

The good news is that by the msan error I have a pretty good on what the
external library is doing wrong, and it's open source software, so I can
actually see even better what it is likely doing wrong.

But fixing the external library is not my top priority, fixing my own software
is.  In the long run all the sanitizer errors from the whole call chain should
of course be fixed, but having to first fix all the external dependencies is
not conducive to timely fixing your own software.

Feature request: add to the sanitizer blacklist a new functionality (available
for msan, and other sanitizers), to specify the shared object/library name,
from which to ignore the sanitizer errors.  Something like this (notice the
wildcarding)

lib: /usr/lib/libfoo.so
lib: /usr/local/lib/libbar.so*

It is important to allow full control of the shared object filename since (1)
they are not *.so in every system (2) even when they are *.so, they might have
extra stuff after them like version numbers.</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>