Merge lp:~abreu-alexandre/v8-cpp/fix-v8-build-wily into lp:v8-cpp

Proposed by Alexandre Abreu
Status: Merged
Approved by: Marcus Tomlinson
Approved revision: 29
Merged at revision: 29
Proposed branch: lp:~abreu-alexandre/v8-cpp/fix-v8-build-wily
Merge into: lp:v8-cpp
Diff against target: 31 lines (+16/-0)
2 files modified
deps/build-deps.sh (+1/-0)
deps/patches/v8/fix-signed-overflow-bignum-error.patch (+15/-0)
To merge this branch: bzr merge lp:~abreu-alexandre/v8-cpp/fix-v8-build-wily
Reviewer Review Type Date Requested Status
Marcus Tomlinson (community) Approve
Review via email: mp+270840@code.launchpad.net

Description of the change

Fix v8 build w/ gcc 5.2.1 & -Werror=strict-overflow

To post a comment you must log in.
Revision history for this message
Marcus Tomlinson (marcustomlinson) wrote :

Awesome thanks for that!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'deps/build-deps.sh'
2--- deps/build-deps.sh 2015-08-31 04:13:15 +0000
3+++ deps/build-deps.sh 2015-09-11 15:18:15 +0000
4@@ -19,4 +19,5 @@
5 gclient sync
6
7 cd v8
8+git apply $DIR/patches/v8/*.patch
9 make -j3 native i18nsupport=off
10
11=== added directory 'deps/patches'
12=== added directory 'deps/patches/v8'
13=== added file 'deps/patches/v8/fix-signed-overflow-bignum-error.patch'
14--- deps/patches/v8/fix-signed-overflow-bignum-error.patch 1970-01-01 00:00:00 +0000
15+++ deps/patches/v8/fix-signed-overflow-bignum-error.patch 2015-09-11 15:18:15 +0000
16@@ -0,0 +1,15 @@
17+diff --git a/src/bignum.cc b/src/bignum.cc
18+index 254cb01..767192b 100644
19+--- a/src/bignum.cc
20++++ b/src/bignum.cc
21+@@ -83,8 +83,8 @@ void Bignum::AssignDecimalString(Vector<const char> value) {
22+ // 2^64 = 18446744073709551616 > 10^19
23+ const int kMaxUint64DecimalDigits = 19;
24+ Zero();
25+- int length = value.length();
26+- int pos = 0;
27++ size_t length = value.length();
28++ size_t pos = 0;
29+ // Let's just say that each digit needs 4 bits.
30+ while (length >= kMaxUint64DecimalDigits) {
31+ uint64_t digits = ReadUInt64(value, pos, kMaxUint64DecimalDigits);

Subscribers

People subscribed via source and target branches