From 530af9cb8e700e7596b3ec812bad123c9fa06356 Mon Sep 17 00:00:00 2001 From: Fedor Indutny Date: Wed, 30 Jul 2014 15:33:52 -0700 Subject: [PATCH] v8: Interrupts must not mask stack overflow. Backport of https://codereview.chromium.org/339883002 --- src/isolate.h | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/isolate.h b/src/isolate.h index b90191d..2769ca7 100644 --- a/src/isolate.h +++ b/src/isolate.h @@ -1392,14 +1392,9 @@ class StackLimitCheck BASE_EMBEDDED { public: explicit StackLimitCheck(Isolate* isolate) : isolate_(isolate) { } - bool HasOverflowed() const { + inline bool HasOverflowed() const { StackGuard* stack_guard = isolate_->stack_guard(); - // Stack has overflowed in C++ code only if stack pointer exceeds the C++ - // stack guard and the limits are not set to interrupt values. - // TODO(214): Stack overflows are ignored if a interrupt is pending. This - // code should probably always use the initial C++ limit. - return (reinterpret_cast(this) < stack_guard->climit()) && - stack_guard->IsStackOverflow(); + return reinterpret_cast(this) < stack_guard->real_climit(); } private: Isolate* isolate_; -- 2.0.3