<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 --- - Regression(281673): libc++ leaks always-visible symbols into programs"
   href="https://llvm.org/bugs/show_bug.cgi?id=30642">30642</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Regression(281673): libc++ leaks always-visible symbols into programs
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>unspecified
          </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>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>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>nicolasweber@gmx.de
          </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>thakis-macpro:llvm-build thakis$ cat test.cc
#include <string.h>
#include <string>
int main(int argc, char* argv[]) {
  std::string b(argv[0], strlen(argv[0]));
  b.insert(b.end(), argv[1], argv[1] + strlen(argv[1]));
}

$ bin/clang++ -fvisibility=hidden -fvisibility-inlines-hidden -std=c++11 -c
test.cc -isysroot $(xcrun -show-sdk-path) && nm -m test.o | grep insert
0000000000001dc0 (__TEXT,__text) weak external
__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6insertIPKcEENS_9enable_ifIXaasr21__is_forward_iteratorIT_EE5valuesr38__libcpp_string_gets_noexcept_iteratorISA_EE5valueENS_11__wrap_iterIPcEEE4typeENSB_IS8_EESA_SA_
00000000000007c0 (__TEXT,__text) weak external
__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6insertIPcEENS_9enable_ifIXaasr21__is_forward_iteratorIT_EE5valuesr38__libcpp_string_gets_noexcept_iteratorIS9_EE5valueENS_11__wrap_iterIS7_EEE4typeENSA_IPKcEES9_S9_


Prior to r281673, these used to be "weak private external" (note private). This
is a problem since these functions will leak from programs that try to control
which functions they export.


(Condensed from the longer report at
<a href="https://bugs.chromium.org/p/chromium/issues/detail?id=653337#c16">https://bugs.chromium.org/p/chromium/issues/detail?id=653337#c16</a>)</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>