Commit 1fe704e1 authored by yangguo's avatar yangguo Committed by Commit bot

[fuzzing] consistently honor --abort-on-stack-overflow.

R=machenbach@chromium.org
BUG=chromium:664068

Review-Url: https://codereview.chromium.org/2509843005
Cr-Commit-Position: refs/heads/master@{#41075}
parent e2563e94
......@@ -1576,14 +1576,13 @@ class StackLimitCheck BASE_EMBEDDED {
Isolate* isolate_;
};
#define STACK_CHECK(isolate, result_value) \
do { \
StackLimitCheck stack_check(isolate); \
if (stack_check.HasOverflowed()) { \
isolate->Throw(*isolate->factory()->NewRangeError( \
MessageTemplate::kStackOverflow)); \
return result_value; \
} \
#define STACK_CHECK(isolate, result_value) \
do { \
StackLimitCheck stack_check(isolate); \
if (stack_check.HasOverflowed()) { \
isolate->StackOverflow(); \
return result_value; \
} \
} while (false)
// Support for temporarily postponing interrupts. When the outermost
......
......@@ -147,8 +147,7 @@ class PrototypeIterator {
// we visit to an arbitrarily chosen large number.
seen_proxies_++;
if (seen_proxies_ > kProxyPrototypeLimit) {
isolate_->Throw(
*isolate_->factory()->NewRangeError(MessageTemplate::kStackOverflow));
isolate_->StackOverflow();
return false;
}
MaybeHandle<Object> proto =
......
......@@ -75,6 +75,7 @@ void RegExpParser::Advance() {
if (has_next()) {
StackLimitCheck check(isolate());
if (check.HasOverflowed()) {
if (FLAG_abort_on_stack_overflow) FATAL("Aborting on stack overflow");
ReportError(CStrVector(
MessageTemplate::TemplateString(MessageTemplate::kStackOverflow)));
} else if (zone()->excess_allocation()) {
......
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