~oxide-developers/oxide/packaging.zesty

« back to all changes in this revision

Viewing changes to debian/patches/v8-zone-alignment.patch

  • Committer: Olivier Tilloy
  • Date: 2016-12-21 16:05:38 UTC
  • Revision ID: olivier.tilloy@canonical.com-20161221160538-t0lml4lv518tsjzx
Tags: 1.19.6-0ubuntu2
releasing package oxide-qt version 1.19.6-0ubuntu2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Description: fix pointer alignment in V8 on arm
 
2
Bug: https://bugs.chromium.org/p/v8/issues/detail?id=5668
 
3
Author: Chris Coulson <chris.coulson@canonical.com>
 
4
 
 
5
Index: oxide-qt-1.19.5/v8/src/zone/zone.cc
 
6
===================================================================
 
7
--- oxide-qt-1.19.5.orig/v8/src/zone/zone.cc
 
8
+++ oxide-qt-1.19.5/v8/src/zone/zone.cc
 
9
@@ -87,6 +87,9 @@
 
10
 
 
11
   // Check that the result has the proper alignment and return it.
 
12
   DCHECK(IsAddressAligned(result, kAlignment, 0));
 
13
+  if (kPointerSize == 4 && kAlignment == 4) {
 
14
+    DCHECK((size & 4) || IsAddressAligned(result, 8, 0));
 
15
+  }
 
16
   allocation_size_ += size;
 
17
   return reinterpret_cast<void*>(result);
 
18
 }
 
19
@@ -209,6 +212,9 @@
 
20
 
 
21
   // Recompute 'top' and 'limit' based on the new segment.
 
22
   Address result = RoundUp(segment->start(), kAlignment);
 
23
+  if (kPointerSize == 4 && kAlignment == 4) {
 
24
+    result += ((~size) & 4) & (reinterpret_cast<intptr_t>(result) & 4);
 
25
+  }
 
26
   position_ = result + size;
 
27
   // Check for address overflow.
 
28
   // (Should not happen since the segment is guaranteed to accomodate