[Webkit-unassigned] [Bug 160572] Undefined behavior ParkingLot.cpp on lockHashtable()
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Aug 5 09:26:07 PDT 2016
https://bugs.webkit.org/show_bug.cgi?id=160572
Jonathan Bedard <jbedard at apple.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |INVALID
--- Comment #11 from Jonathan Bedard <jbedard at apple.com> ---
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:
<File location and line number>: runtime error: <type> overflow: <operation> cannot be represented in type '<type>'
https://bugs.webkit.org/show_bug.cgi?id=160565 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: http://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html
C++ standard:
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4296.pdf
No fix is needed. Marking as resolved.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160805/749f2ba6/attachment.html>
More information about the webkit-unassigned
mailing list