[Webkit-unassigned] [Bug 196829] New: Enable -fwrapv and /d2UndefIntOverflow

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Apr 11 14:29:27 PDT 2019


https://bugs.webkit.org/show_bug.cgi?id=196829

            Bug ID: 196829
           Summary: Enable -fwrapv and /d2UndefIntOverflow
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: ysuzuki at apple.com

We already see a bug caused by signed integer overflow UB.
If it does not hurt performance, we should enable this option to avoid such an UB.
Personally, I think this UB is one of the most common UBs resulting in an actual bug.

An attempt making this behavior by default in the spec exists[1].
While the main focus of that proposal is accepted, "making signed overflow well-defined" is rejected.
So we should enable -fwrapv / d2UndefIntOverflow manually in the WebKit side.

> Status-quo If a signed operation would naturally produce a value that is not within the range of the result type, the behavior is undefined.
> The author had hoped to make this well-defined as wrapping (the operations produce the same value bits as for the corresponding unsigned type), but WG21 had strong resistance against this.

[1]: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0907r2.html

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20190411/f5f0ffa0/attachment-0001.html>


More information about the webkit-unassigned mailing list