55dd5addd8
pushed upstream as https://bugs.webkit.org/show_bug.cgi?id=114978) Seems to fix xombrero/surf crashes on amd64, and seems to magically make webkit sort-of usable (ie dead-slow, but js seems to work) on powerpc. (symptom : ** Message: console message: undefined @0: RangeError: Maximum call stack size exceeded.) Note : webkit still fails to build on mips64* and hppa. sigh. ok jasper@
32 lines
1.2 KiB
Plaintext
32 lines
1.2 KiB
Plaintext
$OpenBSD: patch-Source_WTF_wtf_StackBounds_cpp,v 1.1 2013/04/23 09:40:58 landry Exp $
|
|
https://bugs.webkit.org/show_bug.cgi?id=114978
|
|
--- Source/WTF/wtf/StackBounds.cpp.orig Thu Jun 14 06:23:17 2012
|
|
+++ Source/WTF/wtf/StackBounds.cpp Mon Apr 22 11:13:12 2013
|
|
@@ -60,10 +60,10 @@
|
|
// These platforms should now be working correctly:
|
|
// DARWIN, QNX, UNIX
|
|
// These platforms are not:
|
|
-// WINDOWS, SOLARIS, OPENBSD, WINCE
|
|
+// WINDOWS, SOLARIS, WINCE
|
|
//
|
|
// FIXME: remove this! - this code unsafely guesses at stack sizes!
|
|
-#if OS(WINDOWS) || OS(SOLARIS) || OS(OPENBSD)
|
|
+#if OS(WINDOWS) || OS(SOLARIS)
|
|
// Based on the current limit used by the JSC parser, guess the stack size.
|
|
static const ptrdiff_t estimatedStackSize = 128 * sizeof(void*) * 1024;
|
|
// This method assumes the stack is growing downwards.
|
|
@@ -125,7 +125,12 @@
|
|
stack_t stack;
|
|
pthread_stackseg_np(thread, &stack);
|
|
m_origin = stack.ss_sp;
|
|
- m_bound = estimateStackBound(m_origin);
|
|
+#if defined(__hppa__) || defined(__hppa64__)
|
|
+ // hppa's stack grows up
|
|
+ m_bound = static_cast<char*>(m_origin) + stack.ss_size;
|
|
+#else
|
|
+ m_bound = static_cast<char*>(m_origin) - stack.ss_size;
|
|
+#endif
|
|
}
|
|
|
|
#elif OS(UNIX)
|