diff options
author | Ulf Hermann <ulf.hermann@digia.com> | 2014-10-21 16:50:59 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@digia.com> | 2014-10-30 13:19:37 +0100 |
commit | 2ffb01b45d51b23c834f9f81060f17d3fd90b800 (patch) | |
tree | 06b588ee1571232180feb331012a52bd7ad84b9f /src | |
parent | 625dae442419d3f75bcecbafeaca490cdd5413a8 (diff) |
Add guard pages around JavaScript stack
Like this we avoid writing to random memory if the stack overflows.
Change-Id: I0e0962daae69904a9ce21b047f3d8c0811c1d09f
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/qml/jsruntime/qv4engine.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4engine.cpp b/src/qml/jsruntime/qv4engine.cpp index 057f692bf9..cab49fff82 100644 --- a/src/qml/jsruntime/qv4engine.cpp +++ b/src/qml/jsruntime/qv4engine.cpp @@ -201,7 +201,8 @@ ExecutionEngine::ExecutionEngine(EvalISelFactory *factory) // reserve space for the JS stack // we allow it to grow to 2 times JSStackLimit, as we can overshoot due to garbage collection // and ScopedValues allocated outside of JIT'ed methods. - *jsStack = WTF::PageAllocation::allocate(2*JSStackLimit, WTF::OSAllocator::JSVMStackPages, true); + *jsStack = WTF::PageAllocation::allocate(2*JSStackLimit, WTF::OSAllocator::JSVMStackPages, true, + false, true); jsStackBase = (Value *)jsStack->base(); jsStackTop = jsStackBase; |