Title: [150786] trunk/Source/WTF
Revision
150786
Author
par...@webkit.org
Date
2013-05-27 23:31:48 -0700 (Mon, 27 May 2013)

Log Message

Use correct stack size on Solaris and OpenBSD
https://bugs.webkit.org/show_bug.cgi?id=114978

Recommit after wrong rollout in r150621.

* wtf/StackBounds.cpp:
(WTF):
(WTF::StackBounds::initialize):

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (150785 => 150786)


--- trunk/Source/WTF/ChangeLog	2013-05-28 00:02:46 UTC (rev 150785)
+++ trunk/Source/WTF/ChangeLog	2013-05-28 06:31:48 UTC (rev 150786)
@@ -1,5 +1,16 @@
 2013-05-27  Patrick Gansterer  <par...@webkit.org>
 
+        Use correct stack size on Solaris and OpenBSD
+        https://bugs.webkit.org/show_bug.cgi?id=114978
+
+        Recommit after wrong rollout in r150621.
+
+        * wtf/StackBounds.cpp:
+        (WTF):
+        (WTF::StackBounds::initialize):
+
+2013-05-27  Patrick Gansterer  <par...@webkit.org>
+
         Use ICU_INCLUDE_DIRS in BlackBerry CMake files
         https://bugs.webkit.org/show_bug.cgi?id=116210
 

Modified: trunk/Source/WTF/wtf/StackBounds.cpp (150785 => 150786)


--- trunk/Source/WTF/wtf/StackBounds.cpp	2013-05-28 00:02:46 UTC (rev 150785)
+++ trunk/Source/WTF/wtf/StackBounds.cpp	2013-05-28 06:31:48 UTC (rev 150786)
@@ -58,12 +58,12 @@
 // Bug 26276 - Need a mechanism to determine stack extent
 //
 // These platforms should now be working correctly:
-//     DARWIN, QNX, UNIX
+//     DARWIN, OPENBSD, QNX, SOLARIS, UNIX
 // These platforms are not:
-//     WINDOWS, SOLARIS, OPENBSD, WINCE
+//     WINDOWS, WINCE
 //
 // FIXME: remove this! - this code unsafely guesses at stack sizes!
-#if OS(WINDOWS) || OS(SOLARIS) || OS(OPENBSD)
+#if OS(WINDOWS)
 // 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.
@@ -124,7 +124,7 @@
     stack_t s;
     thr_stksegment(&s);
     m_origin = s.ss_sp;
-    m_bound = estimateStackBound(m_origin);
+    m_bound = static_cast<char*>(m_origin) - s.ss_size;
 }
 
 #elif OS(OPENBSD)
@@ -135,7 +135,11 @@
     stack_t stack;
     pthread_stackseg_np(thread, &stack);
     m_origin = stack.ss_sp;
-    m_bound = estimateStackBound(m_origin);
+#if CPU(HPPA)
+    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)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to