diff options
author | 2009-11-14 14:50:59 +0000 | |
---|---|---|
committer | 2009-11-14 14:50:59 +0000 | |
commit | bc3c4ecf5c95a39ba2f08cb1ff0e0191c75db26b (patch) | |
tree | 1374478d968b7463e0cc86199d69c396d004c266 /net-libs/webkit-gtk/files | |
parent | remove old (diff) | |
download | gentoo-2-bc3c4ecf5c95a39ba2f08cb1ff0e0191c75db26b.tar.gz gentoo-2-bc3c4ecf5c95a39ba2f08cb1ff0e0191c75db26b.tar.bz2 gentoo-2-bc3c4ecf5c95a39ba2f08cb1ff0e0191c75db26b.zip |
Add patch from Debian to fix unaligned accesses, with permission from remi, bug #292940
(Portage version: 2.1.6.13/cvs/Linux ia64)
Diffstat (limited to 'net-libs/webkit-gtk/files')
-rw-r--r-- | net-libs/webkit-gtk/files/webkit-gtk-1.1.15.2-unaligned.patch | 139 |
1 files changed, 139 insertions, 0 deletions
diff --git a/net-libs/webkit-gtk/files/webkit-gtk-1.1.15.2-unaligned.patch b/net-libs/webkit-gtk/files/webkit-gtk-1.1.15.2-unaligned.patch new file mode 100644 index 000000000000..ae2d9216516f --- /dev/null +++ b/net-libs/webkit-gtk/files/webkit-gtk-1.1.15.2-unaligned.patch @@ -0,0 +1,139 @@ +--- webkit-1.1.16.orig/JavaScriptCore/wtf/Platform.h ++++ webkit-1.1.16/JavaScriptCore/wtf/Platform.h +@@ -347,6 +347,23 @@ + #define WTF_PLATFORM_X86_64 1 + #endif + ++/* PLATFORM(IA64) */ ++#if defined(__ia64__) ++#define WTF_PLATFORM_IA64 1 ++#endif ++ ++/* PLATFORM(ALPHA) */ ++#if defined(__alpha__) ++#define WTF_PLATFORM_ALPHA 1 ++#endif ++ ++/* PLATFORM(SPARC) */ ++#if defined(__sparc__) \ ++ || defined(__sparc) ++#define WTF_PLATFORM_SPARC 1 ++#define WTF_PLATFORM_BIG_ENDIAN 1 ++#endif ++ + /* PLATFORM(SH4) */ + #if defined(__SH4__) + #define WTF_PLATFORM_SH4 1 +@@ -372,6 +389,16 @@ + # endif + #endif + ++/* For undefined platforms */ ++#if !defined(WTF_PLATFORM_BIG_ENDIAN) && !defined(WTF_PLATFORM_MIDDLE_ENDIAN) ++#include <sys/param.h> ++#if __BYTE_ORDER == __BIG_ENDIAN ++#define WTF_PLATFORM_BIG_ENDIAN 1 ++#elif __BYTE_ORDER == __PDP_ENDIAN ++#define WTF_PLATFORM_MIDDLE_ENDIAN 1 ++#endif ++#endif ++ + /* Compiler */ + + /* COMPILER(MSVC) */ +@@ -703,7 +730,7 @@ + #endif + + #if !defined(WTF_USE_JSVALUE64) && !defined(WTF_USE_JSVALUE32) && !defined(WTF_USE_JSVALUE32_64) +-#if PLATFORM(X86_64) && (PLATFORM(DARWIN) || PLATFORM(LINUX)) ++#if (PLATFORM(X86_64) && (PLATFORM(DARWIN) || PLATFORM(LINUX) || PLATFORM(FREEBSD))) || PLATFORM(IA64) || PLATFORM(ALPHA) + #define WTF_USE_JSVALUE64 1 + #elif PLATFORM(ARM) || PLATFORM(PPC64) + #define WTF_USE_JSVALUE32 1 +--- webkit-1.1.16.orig/JavaScriptCore/wtf/ListHashSet.h ++++ webkit-1.1.16/JavaScriptCore/wtf/ListHashSet.h +@@ -127,7 +127,7 @@ + : m_freeList(pool()) + , m_isDoneWithInitialFreeList(false) + { +- memset(m_pool.pool, 0, sizeof(m_pool.pool)); ++ memset(m_pool, 0, sizeof(m_pool)); + } + + Node* allocate() +@@ -171,7 +171,7 @@ + } + + private: +- Node* pool() { return reinterpret_cast<Node*>(m_pool.pool); } ++ Node* pool() { return reinterpret_cast<Node*>(m_pool); } + Node* pastPool() { return pool() + m_poolSize; } + + bool inPool(Node* node) +@@ -182,10 +182,7 @@ + Node* m_freeList; + bool m_isDoneWithInitialFreeList; + static const size_t m_poolSize = 256; +- 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> struct ListHashSetNode { +--- webkit-1.1.16.orig/JavaScriptCore/wtf/FastMalloc.cpp ++++ webkit-1.1.16/JavaScriptCore/wtf/FastMalloc.cpp +@@ -2259,13 +2259,13 @@ + + // Page-level allocator + static SpinLock pageheap_lock = SPINLOCK_INITIALIZER; +-static void* pageheap_memory[(sizeof(TCMalloc_PageHeap) + sizeof(void*) - 1) / sizeof(void*)]; ++static uint64_t pageheap_memory[(sizeof(TCMalloc_PageHeap) + sizeof(uint64_t) - 1) / sizeof(uint64_t)]; + static bool phinited = false; + + // Avoid extra level of indirection by making "pageheap" be just an alias + // of pageheap_memory. + typedef union { +- void* m_memory; ++ uint64_t* m_memory; + TCMalloc_PageHeap* m_pageHeap; + } PageHeapUnion; + +--- webkit-1.1.16.orig/WebCore/platform/text/AtomicString.cpp ++++ webkit-1.1.16/WebCore/platform/text/AtomicString.cpp +@@ -103,7 +103,7 @@ + if (string->length() != length) + return false; + +-#if PLATFORM(ARM) || PLATFORM(SH4) ++#if PLATFORM(ARM) || PLATFORM(SPARC) || PLATFORM(SH4) + const UChar* stringCharacters = string->characters(); + for (unsigned i = 0; i != length; ++i) { + if (*stringCharacters++ != *characters++) +--- webkit-1.1.16.orig/WebCore/platform/text/StringHash.h ++++ webkit-1.1.16/WebCore/platform/text/StringHash.h +@@ -47,6 +47,15 @@ + if (aLength != bLength) + return false; + ++#if PLATFORM(ARM) || PLATFORM(SPARC) ++ const UChar* aChars = a->characters(); ++ const UChar* bChars = b->characters(); ++ for (unsigned i = 0; i != aLength; ++i) ++ if (*aChars++ != *bChars++) ++ return false; ++ ++ return true; ++#else + const uint32_t* aChars = reinterpret_cast<const uint32_t*>(a->characters()); + const uint32_t* bChars = reinterpret_cast<const uint32_t*>(b->characters()); + +@@ -59,6 +68,7 @@ + return false; + + return true; ++#endif + } + + static unsigned hash(const RefPtr<StringImpl>& key) { return key->hash(); }
\ No newline at end of file |