Bug#487745: epiphany-webkit: crashes on startup

Mike Hommey mh at glandium.org
Thu Jun 26 22:25:08 UTC 2008


On Wed, Jun 25, 2008 at 01:32:44PM +0200, Axel Beckert wrote:
> Hi,
> 
> On Wed, Jun 25, 2008 at 01:08:29PM +0200, Mike Hommey wrote:
> > Could you put the built package (including the -dbg pacakge) somewhere
> > to be downloaded ?
> 
> The files are available at http://noone.org/debian/Bug-Reports/.
> 
> The .diff.gz and .dsc still were from from yesterday and therefore
> probably doesn't contain all the patches, so I haven't uploaded it. I
> suspect the -nc option as reason for this. But for debugging this bug
> it shouldn't matter that much...

With the attached patch, it now should at least start and display some
stuff. There may still be issues, though.

Mike
-------------- next part --------------
diff --git a/JavaScriptCore/wtf/FastMalloc.cpp b/JavaScriptCore/wtf/FastMalloc.cpp
index 8afc70d..5e5ad5b 100644
--- a/JavaScriptCore/wtf/FastMalloc.cpp
+++ b/JavaScriptCore/wtf/FastMalloc.cpp
@@ -1820,13 +1820,13 @@ static TCMalloc_Central_FreeListPadded central_cache[kNumClasses];
 
 // 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;
 
diff --git a/JavaScriptCore/wtf/Platform.h b/JavaScriptCore/wtf/Platform.h
index b9e250c..e995896 100644
--- a/JavaScriptCore/wtf/Platform.h
+++ b/JavaScriptCore/wtf/Platform.h
@@ -172,6 +172,23 @@
 #define WTF_PLATFORM_X86_64 1
 #endif
 
+/* PLATFORM(SPARC) */
+#if   defined(__sparc__) \
+   || defined(__sparc) \
+#define WTF_PLATFORM_SPARC 1
+#define WTF_PLATFORM_BIG_ENDIAN 1
+#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) */
diff --git a/JavaScriptCore/wtf/Vector.h b/JavaScriptCore/wtf/Vector.h
index f170a18..e253981 100644
--- a/JavaScriptCore/wtf/Vector.h
+++ b/JavaScriptCore/wtf/Vector.h
@@ -383,8 +383,7 @@ namespace WTF {
         static const size_t m_inlineBufferSize = inlineCapacity * sizeof(T);
         T* inlineBuffer() { return reinterpret_cast<T*>(&m_inlineBuffer); }
 
-        // FIXME: Nothing guarantees this buffer is appropriately aligned to hold objects of type T.
-        char m_inlineBuffer[m_inlineBufferSize];
+        uuint64_t m_inlineBuffer[(m_inlineBufferSize + sizeof(uint64_t) - 1) / sizeof(uint64_t)];
     };
 
     template<typename T, size_t inlineCapacity = 0>
diff --git a/WebCore/platform/text/AtomicString.cpp b/WebCore/platform/text/AtomicString.cpp
index d908dca..1460904 100644
--- a/WebCore/platform/text/AtomicString.cpp
+++ b/WebCore/platform/text/AtomicString.cpp
@@ -94,7 +94,7 @@ static inline bool equal(StringImpl* string, const UChar* characters, unsigned l
     if (string->length() != length)
         return false;
 
-#if PLATFORM(ARM)
+#if PLATFORM(ARM) || PLATFORM(SPARC)
     const UChar* stringCharacters = string->characters();
     for (unsigned i = 0; i != length; ++i) {
         if (*stringCharacters++ != *characters++)


More information about the Pkg-webkit-maintainers mailing list