[SCM] WebKit Debian packaging branch, debian/experimental, updated. debian/1.3.8-1-142-g786665c
barraclough at apple.com
barraclough at apple.com
Mon Dec 27 16:29:05 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 080582f8c5a409b38a90b40b18247656ab8b2033
Author: barraclough at apple.com <barraclough at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Dec 22 04:29:33 2010 +0000
Bug 26276 - Need a mechanism to determine stack extent
Reviewed by Oliver Hunt.
This patch adds accurate stack size calculation for:
DARWIN, QNX, UNIX
We still need to fix:
WINDOWS, SOLARIS, OPENBSD, SYMBIAN, HAIKU, WINCE
* wtf/StackBounds.cpp:
(WTF::StackBounds::initialize):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74455 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/JavaScriptCore/ChangeLog b/JavaScriptCore/ChangeLog
index eb25e7d..78a5e86 100644
--- a/JavaScriptCore/ChangeLog
+++ b/JavaScriptCore/ChangeLog
@@ -1,5 +1,19 @@
2010-12-21 Gavin Barraclough <barraclough at apple.com>
+ Reviewed by Oliver Hunt.
+
+ Bug 26276 - Need a mechanism to determine stack extent
+
+ This patch adds accurate stack size calculation for:
+ DARWIN, QNX, UNIX
+ We still need to fix:
+ WINDOWS, SOLARIS, OPENBSD, SYMBIAN, HAIKU, WINCE
+
+ * wtf/StackBounds.cpp:
+ (WTF::StackBounds::initialize):
+
+2010-12-21 Gavin Barraclough <barraclough at apple.com>
+
Reviewed by Geoff Garen.
<rdar://problem/8765333> CRASH running out of executable memory, loading io9.com
diff --git a/JavaScriptCore/wtf/StackBounds.cpp b/JavaScriptCore/wtf/StackBounds.cpp
index 2f91c2b..2691db1 100644
--- a/JavaScriptCore/wtf/StackBounds.cpp
+++ b/JavaScriptCore/wtf/StackBounds.cpp
@@ -57,14 +57,23 @@
namespace WTF {
+// Bug 26276 - Need a mechanism to determine stack extent
+//
+// These platforms should now be working correctly:
+// DARWIN, QNX, UNIX
+// These platforms are not:
+// WINDOWS, SOLARIS, OPENBSD, SYMBIAN, HAIKU, WINCE
+//
+// FIXME: remove this! - this code unsafely guesses at stack sizes!
+#if OS(WINDOWS) || OS(SOLARIS) || OS(OPENBSD) || OS(SYMBIAN) || OS(HAIKU) || OS(WINCE)
// 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.
static void* estimateStackBound(void* origin)
{
return static_cast<char*>(origin) - estimatedStackSize;
}
+#endif
#if OS(DARWIN)
@@ -72,7 +81,7 @@ void StackBounds::initialize()
{
pthread_t thread = pthread_self();
m_origin = pthread_get_stackaddr_np(thread);
- m_bound = estimateStackBound(m_origin);
+ m_bound = static_cast<char*>(m_origin) - pthread_get_stacksize_np(thread);
}
#elif OS(WINDOWS)
@@ -102,6 +111,7 @@ void StackBounds::initialize()
#else
#error Need a way to get the stack bounds on this platform (Windows)
#endif
+ // Looks like we should be able to get pTib->StackLimit
m_bound = estimateStackBound(m_origin);
}
@@ -127,8 +137,8 @@ void StackBounds::initialize()
stackSize = threadInfo.stksize;
ASSERT(stackBase);
+ m_bound = stackBase;
m_origin = static_cast<char*>(stackBase) + stackSize;
- m_bound = estimateStackBound(m_origin);
}
#elif OS(SOLARIS)
@@ -194,8 +204,8 @@ void StackBounds::initialize()
(void)rc; // FIXME: Deal with error code somehow? Seems fatal.
ASSERT(stackBase);
pthread_attr_destroy(&sattr);
+ m_bound = stackBase;
m_origin = static_cast<char*>(stackBase) + stackSize;
- m_bound = estimateStackBound(m_origin);
}
#elif OS(WINCE)
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list