Title: [161169] branches/jsCStack/Source/_javascript_Core
- Revision
- 161169
- Author
- [email protected]
- Date
- 2013-12-30 21:18:42 -0800 (Mon, 30 Dec 2013)
Log Message
CStack: Introducing Options::maxStackSize().
https://bugs.webkit.org/show_bug.cgi?id=126321.
Not yet reviewed.
We need an option to limit the JS stack size. Currently, we just change
the JSStack class to use this limit.
* interpreter/JSStack.cpp:
(JSC::JSStack::JSStack):
* interpreter/JSStack.h:
* runtime/Options.h:
Modified Paths
Diff
Modified: branches/jsCStack/Source/_javascript_Core/ChangeLog (161168 => 161169)
--- branches/jsCStack/Source/_javascript_Core/ChangeLog 2013-12-31 04:46:02 UTC (rev 161168)
+++ branches/jsCStack/Source/_javascript_Core/ChangeLog 2013-12-31 05:18:42 UTC (rev 161169)
@@ -1,3 +1,18 @@
+2013-12-30 Mark Lam <[email protected]>
+
+ CStack: Introducing Options::maxStackSize().
+ https://bugs.webkit.org/show_bug.cgi?id=126321.
+
+ Not yet reviewed.
+
+ We need an option to limit the JS stack size. Currently, we just change
+ the JSStack class to use this limit.
+
+ * interpreter/JSStack.cpp:
+ (JSC::JSStack::JSStack):
+ * interpreter/JSStack.h:
+ * runtime/Options.h:
+
2013-12-29 Filip Pizlo <[email protected]>
CStack branch with --ftl-jit should fail no more tests than without FTL as of r161113
Modified: branches/jsCStack/Source/_javascript_Core/interpreter/JSStack.cpp (161168 => 161169)
--- branches/jsCStack/Source/_javascript_Core/interpreter/JSStack.cpp 2013-12-31 04:46:02 UTC (rev 161168)
+++ branches/jsCStack/Source/_javascript_Core/interpreter/JSStack.cpp 2013-12-31 05:18:42 UTC (rev 161169)
@@ -53,10 +53,10 @@
#endif
{
#if ENABLE(LLINT_C_LOOP)
- size_t capacity = defaultCapacity;
+ size_t capacity = Options::maxStackSize();
ASSERT(capacity && isPageAligned(capacity));
- m_reservation = PageReservation::reserve(roundUpAllocationSize(capacity * sizeof(Register), commitSize), OSAllocator::JSVMStackPages);
+ m_reservation = PageReservation::reserve(roundUpAllocationSize(capacity, commitSize), OSAllocator::JSVMStackPages);
setStackLimit(highAddress());
m_commitTop = highAddress();
Modified: branches/jsCStack/Source/_javascript_Core/interpreter/JSStack.h (161168 => 161169)
--- branches/jsCStack/Source/_javascript_Core/interpreter/JSStack.h 2013-12-31 04:46:02 UTC (rev 161168)
+++ branches/jsCStack/Source/_javascript_Core/interpreter/JSStack.h 2013-12-31 05:18:42 UTC (rev 161169)
@@ -75,7 +75,6 @@
FirstArgument,
};
- static const size_t defaultCapacity = 512 * 1024;
static const size_t commitSize = 16 * 1024;
// Allow 8k of excess registers before we start trying to reap the stack
static const ptrdiff_t maxExcessCapacity = 8 * 1024;
Modified: branches/jsCStack/Source/_javascript_Core/runtime/Options.h (161168 => 161169)
--- branches/jsCStack/Source/_javascript_Core/runtime/Options.h 2013-12-31 04:46:02 UTC (rev 161168)
+++ branches/jsCStack/Source/_javascript_Core/runtime/Options.h 2013-12-31 05:18:42 UTC (rev 161169)
@@ -29,6 +29,7 @@
#include "JSExportMacros.h"
#include <stdint.h>
#include <stdio.h>
+#include <wtf/StdLibExtras.h>
namespace JSC {
@@ -94,6 +95,8 @@
v(bool, useDFGJIT, true) \
v(bool, useRegExpJIT, true) \
\
+ v(unsigned, maxStackSize, 4 * MB) \
+ \
v(bool, crashIfCantAllocateJITMemory, false) \
\
v(bool, forceDFGCodeBlockLiveness, false) \
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes