Browse Source

v8: Interrupts must not mask stack overflow.

Backport of https://codereview.chromium.org/339883002
v0.10.30-release
Fedor Indutny 10 years ago
committed by Timothy J Fontaine
parent
commit
530af9cb8e
  1. 9
      deps/v8/src/isolate.h

9
deps/v8/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_;

Loading…
Cancel
Save