Commit 6ca8c11f authored by jarin's avatar jarin Committed by Commit bot

Add a flag for aborting on stack overflow.

This is useful for correctness fuzzing where different compilers might
overflow the stack in different points.

Review-Url: https://codereview.chromium.org/2381773003
Cr-Commit-Position: refs/heads/master@{#39862}
parent c1e320b0
...@@ -868,6 +868,10 @@ DEFINE_BOOL(stack_trace_on_illegal, false, ...@@ -868,6 +868,10 @@ DEFINE_BOOL(stack_trace_on_illegal, false,
"print stack trace when an illegal exception is thrown") "print stack trace when an illegal exception is thrown")
DEFINE_BOOL(abort_on_uncaught_exception, false, DEFINE_BOOL(abort_on_uncaught_exception, false,
"abort program (dump core) when an uncaught exception is thrown") "abort program (dump core) when an uncaught exception is thrown")
DEFINE_BOOL(abort_on_stack_overflow, false,
"Abort program when stack overflow (as opposed to throwing "
"RangeError). This is useful for fuzzing where the spec behaviour "
"would introduce nondeterminism.")
DEFINE_BOOL(randomize_hashes, true, DEFINE_BOOL(randomize_hashes, true,
"randomize hashes to avoid predictable hash collisions " "randomize hashes to avoid predictable hash collisions "
"(with snapshots this option cannot override the baked-in seed)") "(with snapshots this option cannot override the baked-in seed)")
......
...@@ -925,6 +925,10 @@ bool Isolate::MayAccess(Handle<Context> accessing_context, ...@@ -925,6 +925,10 @@ bool Isolate::MayAccess(Handle<Context> accessing_context,
Object* Isolate::StackOverflow() { Object* Isolate::StackOverflow() {
if (FLAG_abort_on_stack_overflow) {
FATAL("Aborting on stack overflow");
}
DisallowJavascriptExecution no_js(this); DisallowJavascriptExecution no_js(this);
HandleScope scope(this); HandleScope scope(this);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment