Skip to content

Commit

Permalink
v8: Interrupts must not mask stack overflow.
Browse files Browse the repository at this point in the history
  • Loading branch information
indutny authored and tjfontaine committed Jul 31, 2014
1 parent 1223caf commit 530af9c
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions deps/v8/src/isolate.h
Original file line number Diff line number Diff line change
Expand Up @@ -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_;
Expand Down

0 comments on commit 530af9c

Please sign in to comment.