61190f187b
landry@ (maintainer) is currently away, so ok jasper@
32 lines
1.2 KiB
Plaintext
32 lines
1.2 KiB
Plaintext
$OpenBSD: patch-Source_WTF_wtf_StackBounds_cpp,v 1.2 2013/05/07 14:16:52 ajacoutot Exp $
|
|
https://bugs.webkit.org/show_bug.cgi?id=114978
|
|
--- Source/WTF/wtf/StackBounds.cpp.orig Thu Jun 14 12:23:17 2012
|
|
+++ Source/WTF/wtf/StackBounds.cpp Tue May 7 09:48:59 2013
|
|
@@ -60,10 +60,10 @@ namespace WTF {
|
|
// 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 @@ void StackBounds::initialize()
|
|
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)
|