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
It is already fixed in V8: https://github.com/v8/v8/commit/e28183b5977a2d2732f7f8b9a2f26637c9566585
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.
Created attachment 264579 [details] Patch typo fixed
Comment on attachment 264579 [details] Patch r=me
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.
*** Bug 151553 has been marked as a duplicate of this bug. ***
Created attachment 266198 [details] Patch for landing
Comment on attachment 266198 [details] Patch for landing Clearing flags on attachment: 266198 Committed r192779: <http://trac.webkit.org/changeset/192779>
All reviewed patches have been landed. Closing bug.