WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
196829
Enable -fwrapv and /d2UndefIntOverflow
https://bugs.webkit.org/show_bug.cgi?id=196829
Summary
Enable -fwrapv and /d2UndefIntOverflow
Yusuke Suzuki
Reported
2019-04-11 14:29:27 PDT
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
Attachments
Add attachment
proposed patch, testcase, etc.
Yusuke Suzuki
Comment 1
2019-04-11 15:15:40 PDT
Maybe, this would be my weekend task just for fun.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug