<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 - Problems intercepting strnlen on Windows 10 build 1703"
   href="https://bugs.llvm.org/show_bug.cgi?id=32895">32895</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Problems intercepting strnlen on Windows 10 build 1703
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>compiler-rt
          </td>
        </tr>

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

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

        <tr>
          <th>OS</th>
          <td>Windows NT
          </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>compiler-rt
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>dmajor@mozilla.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Originally filed as <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1361185">https://bugzilla.mozilla.org/show_bug.cgi?id=1361185</a>

strnlen changed in Windows 10 build 1703 (Creators Update) leading to two
problems in ASan's interceptors:

1) ucrtbase!strnlen now starts with:
8b052a0a0c00    mov     eax,dword ptr [ucrtbase!_isa_available]
which is unrecognized by GetInstructionSize().

2) There are now two different implementations of strnlen in the system
libraries: ntdll!strnlen and ucrtbase!strnlen. Because of the way that
OverrideFunction() loops over InterestingDLLsAvailable(), ASan ends up
detouring both functions to the same place, which is bad when they both try to
use the same return pointer at __interception::real_strnlen.</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>