[Webkit-unassigned] [Bug 160565] New: Undefined behavior in StdLibExtras.h, bitCount
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Aug 4 13:45:46 PDT 2016
https://bugs.webkit.org/show_bug.cgi?id=160565
Bug ID: 160565
Summary: Undefined behavior in StdLibExtras.h, bitCount
Classification: Unclassified
Product: WebKit
Version: WebKit Nightly Build
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: WebCore Misc.
Assignee: webkit-unassigned at lists.webkit.org
Reporter: jbedard at apple.com
In StdLibExtras.h bitCount, there is undefined behavior on return. The line:
return (((bits + (bits >> 4)) & 0xF0F0F0F) * 0x1010101) >> 24
almost always has undefined behavior. In this case, the overflow is expected. However, compiler optimization (given that this function is an inline) with constants may preform unexpected operations
--
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/20160804/80c0334d/attachment.html>
More information about the webkit-unassigned
mailing list