v8/v8-3.14.5.10-interrupts-stack-overflow.patch
T.C. Hollingsworth 643e7db07d nodejs 0.10.31/0.10.32 backport roundup
- backport bugfix that eliminates unused-local-typedefs warning
- backport security fix: Fix Hydrogen bounds check elimination (CVE-2013-6668; RHBZ#1086120)
- backport fix to segfault caused by the above patch
2014-09-17 19:35:57 -07:00

31 lines
1.2 KiB
Diff

From 530af9cb8e700e7596b3ec812bad123c9fa06356 Mon Sep 17 00:00:00 2001
From: Fedor Indutny <fedor@indutny.com>
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<uintptr_t>(this) < stack_guard->climit()) &&
- stack_guard->IsStackOverflow();
+ return reinterpret_cast<uintptr_t>(this) < stack_guard->real_climit();
}
private:
Isolate* isolate_;