Adjust stack limit again to avoid overflow on 64 bit windows
Also add additional stack check. R=mstarzinger@chromium.org Review URL: https://chromiumcodereview.appspot.com/10006010 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11238 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
3861063018
commit
ed5d288ac1
@ -2295,6 +2295,12 @@ Genesis::Genesis(Isolate* isolate,
|
|||||||
HandleScope scope;
|
HandleScope scope;
|
||||||
SaveContext saved_context(isolate);
|
SaveContext saved_context(isolate);
|
||||||
|
|
||||||
|
// During genesis, the boilerplate for stack overflow won't work until the
|
||||||
|
// environment has been at least partially initialized. Add a stack check
|
||||||
|
// before entering JS code to catch overflow early.
|
||||||
|
StackLimitCheck check(Isolate::Current());
|
||||||
|
if (check.HasOverflowed()) return;
|
||||||
|
|
||||||
Handle<Context> new_context = Snapshot::NewContextFromSnapshot();
|
Handle<Context> new_context = Snapshot::NewContextFromSnapshot();
|
||||||
if (!new_context.is_null()) {
|
if (!new_context.is_null()) {
|
||||||
global_context_ =
|
global_context_ =
|
||||||
|
@ -312,7 +312,7 @@ DEFINE_bool(break_on_abort, true, "always cause a debug break before aborting")
|
|||||||
// execution.cc
|
// execution.cc
|
||||||
// Slightly less than 1MB on 64-bit, since Windows' default stack size for
|
// Slightly less than 1MB on 64-bit, since Windows' default stack size for
|
||||||
// the main execution thread is 1MB for both 32 and 64-bit.
|
// the main execution thread is 1MB for both 32 and 64-bit.
|
||||||
DEFINE_int(stack_size, kPointerSize * 125,
|
DEFINE_int(stack_size, kPointerSize * 123,
|
||||||
"default size of stack region v8 is allowed to use (in kBytes)")
|
"default size of stack region v8 is allowed to use (in kBytes)")
|
||||||
|
|
||||||
// frames.cc
|
// frames.cc
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
|
|
||||||
var d = 0;
|
var d = 0;
|
||||||
function recurse() {
|
function recurse() {
|
||||||
if (++d == 25515) { // A magic number just below stack overflow on ia32
|
if (++d == 25135) { // A magic number just below stack overflow on ia32
|
||||||
%DebugBreak();
|
%DebugBreak();
|
||||||
}
|
}
|
||||||
recurse();
|
recurse();
|
||||||
|
Loading…
Reference in New Issue
Block a user