WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 150797
Fix build warning in bignum.cc
https://bugs.webkit.org/show_bug.cgi?id=150797
Summary
Fix build warning in bignum.cc
Csaba Osztrogonác
Reported
2015-11-02 05:49:18 PST
With GCC 5.2 I got the following warning: /home/ossy/WebKit/Source/WTF/wtf/dtoa/bignum.cc: In member function ‘void WTF::double_conversion::Bignum::AssignDecimalString(WTF::double_conversion::BufferReference<const char>)’: /home/ossy/WebKit/Source/WTF/wtf/dtoa/bignum.cc:105:10: error: assuming signed overflow does not occur when assuming that (X + c) < X is always false [-Werror=strict-overflow] void Bignum::AssignDecimalString(BufferReference<const char> value) { ^ cc1plus: all warnings being treated as errors
Attachments
Patch
(1.28 KB, patch)
2015-11-02 05:52 PST
,
Csaba Osztrogonác
no flags
Details
Formatted Diff
Diff
Patch
(1.28 KB, patch)
2015-11-02 05:54 PST
,
Csaba Osztrogonác
no flags
Details
Formatted Diff
Diff
Patch for landing
(1.31 KB, patch)
2015-11-27 05:10 PST
,
Csaba Osztrogonác
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Csaba Osztrogonác
Comment 1
2015-11-02 05:49:35 PST
It is already fixed in V8:
https://github.com/v8/v8/commit/e28183b5977a2d2732f7f8b9a2f26637c9566585
Csaba Osztrogonác
Comment 2
2015-11-02 05:52:41 PST
Created
attachment 264578
[details]
Patch It's not the best fix, because it suppresses this warning. But from and digits_to_read are small numbers, it is unlikely to reach overflow in a real life use case.
Csaba Osztrogonác
Comment 3
2015-11-02 05:54:21 PST
Created
attachment 264579
[details]
Patch typo fixed
Geoffrey Garen
Comment 4
2015-11-02 10:15:26 PST
Comment on
attachment 264579
[details]
Patch r=me
Darin Adler
Comment 5
2015-11-02 22:32:56 PST
Comment on
attachment 264579
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=264579&action=review
> Source/WTF/wtf/dtoa/bignum.cc:98 > - for (int i = from; i < from + digits_to_read; ++i) { > + int to = from + digits_to_read; > + for (int i = from; i < to; ++i) { > int digit = buffer[i] - '0';
Instead of just quieting the warning I would have suggested: for (int i = 0; i <digits_to_read; ++i) { int digit = buffer[from + i] - '0'; Seems slightly more in the spirit of the warning.
Hunseop Jeong
Comment 6
2015-11-22 16:23:21 PST
***
Bug 151553
has been marked as a duplicate of this bug. ***
Csaba Osztrogonác
Comment 7
2015-11-27 05:10:39 PST
Created
attachment 266198
[details]
Patch for landing
WebKit Commit Bot
Comment 8
2015-11-27 05:24:27 PST
Comment on
attachment 266198
[details]
Patch for landing Clearing flags on attachment: 266198 Committed
r192779
: <
http://trac.webkit.org/changeset/192779
>
WebKit Commit Bot
Comment 9
2015-11-27 05:24:32 PST
All reviewed patches have been landed. Closing bug.
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