<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:jbedard&#64;apple.com" title="Jonathan Bedard &lt;jbedard&#64;apple.com&gt;"> <span class="fn">Jonathan Bedard</span></a>
</span> changed
              <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED INVALID - Undefined behavior ParkingLot.cpp on lockHashtable()"
   href="https://bugs.webkit.org/show_bug.cgi?id=160572">bug 160572</a>
        <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">Status</td>
           <td>NEW
           </td>
           <td>RESOLVED
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Resolution</td>
           <td>---
           </td>
           <td>INVALID
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED INVALID - Undefined behavior ParkingLot.cpp on lockHashtable()"
   href="https://bugs.webkit.org/show_bug.cgi?id=160572#c11">Comment # 11</a>
              on <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED INVALID - Undefined behavior ParkingLot.cpp on lockHashtable()"
   href="https://bugs.webkit.org/show_bug.cgi?id=160572">bug 160572</a>
              from <span class="vcard"><a class="email" href="mailto:jbedard&#64;apple.com" title="Jonathan Bedard &lt;jbedard&#64;apple.com&gt;"> <span class="fn">Jonathan Bedard</span></a>
</span></b>
        <pre>First, a minor note to Daniel's nit, it's interesting that the style checker didn't catch that, because it probably should have.

Second, and to address the larger issue brought up by Daniel, further investigation has revealed that this behavior is defined, just 'suspicious' (according to clang).  Due to some local changes I have made and the time it takes to compile clang with the undefined behavior sanitizer flags on, I do not have the exact error.  I do, however, know the format:

&lt;File location and line number&gt;: runtime error: &lt;type&gt; overflow: &lt;operation&gt; cannot be represented in type '&lt;type&gt;'

<a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED INVALID - Undefined behavior in StdLibExtras.h, bitCount"
   href="show_bug.cgi?id=160565">https://bugs.webkit.org/show_bug.cgi?id=160565</a> has an example of another unsigned type overflowing.

Some brief digging has revealed that clang is combining some 'suspicious' behaviors with 'undefined' behaviors, and this is a case of 'suspicious' behavior, but, as per C++ 2014 standard 3.9.1, 4, unsigned types overflow with modulo 2^n, which is our desired behavior in this case.  In short, the behavior corrected here is both defined and desired.

Undefined behavior sanitizer information: <a href="http://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html">http://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html</a>

C++ standard:
<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4296.pdf">http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4296.pdf</a>

No fix is needed.  Marking as resolved.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>