Package: qt4-x11 / 4:4.8.7+dfsg-18

30_webkit_unaligned_access.diff Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
From: Mike Hommey <glandium@debian.org>
Date: Sun, 6 Jul 2008 08:37:28 +0000 (+0200)
Subject: Fixed some alignment problems on sparc
X-Git-Tag: debian/1.0.1-1~7
X-Git-Url: http://git.debian.org/?p=pkg-webkit%2Fwebkit.git;a=commitdiff_plain;h=11c220f6d31898a7a1dfafd5d96619fefe6ba597;hp=1db04c3a5c8c3e9c990b93836d5bb09d43a47921

Fixed some alignment problems on sparc

(and some that might occur on arm, too).

Some compiler warnings about alignment remain, but I don't know if they are
a real problem yet.
---
 src/3rdparty/webkit/Source/JavaScriptCore/wtf/ListHashSet.h |    9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

--- a/src/3rdparty/webkit/Source/JavaScriptCore/wtf/ListHashSet.h
+++ b/src/3rdparty/webkit/Source/JavaScriptCore/wtf/ListHashSet.h
@@ -145,7 +145,7 @@ namespace WTF {
             : m_freeList(pool())
             , m_isDoneWithInitialFreeList(false)
         { 
-            memset(m_pool.pool, 0, sizeof(m_pool.pool));
+            memset(m_pool, 0, sizeof(m_pool));
         }
 
         Node* allocate()
@@ -189,7 +189,7 @@ namespace WTF {
         }
 
     private:
-        Node* pool() { return reinterpret_cast_ptr<Node*>(m_pool.pool); }
+        Node* pool() { return reinterpret_cast_ptr<Node*>(m_pool); }
         Node* pastPool() { return pool() + m_poolSize; }
 
         bool inPool(Node* node)
@@ -200,10 +200,7 @@ namespace WTF {
         Node* m_freeList;
         bool m_isDoneWithInitialFreeList;
         static const size_t m_poolSize = inlineCapacity;
-        union {
-            char pool[sizeof(Node) * m_poolSize];
-            double forAlignment;
-        } m_pool;
+        uint32_t m_pool[(sizeof(Node) * m_poolSize + sizeof(uint32_t) - 1) / sizeof(uint32_t)];
     };
 
     template<typename ValueArg, size_t inlineCapacity> struct ListHashSetNode {