Skip to content
This repository was archived by the owner on Apr 22, 2023. It is now read-only.

Commit 530af9c

Browse files
indutnytjfontaine
authored andcommitted
v8: Interrupts must not mask stack overflow.
Backport of https://codereview.chromium.org/339883002
1 parent 1223caf commit 530af9c

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

Diff for: deps/v8/src/isolate.h

+2-7
Original file line numberDiff line numberDiff line change
@@ -1392,14 +1392,9 @@ class StackLimitCheck BASE_EMBEDDED {
13921392
public:
13931393
explicit StackLimitCheck(Isolate* isolate) : isolate_(isolate) { }
13941394

1395-
bool HasOverflowed() const {
1395+
inline bool HasOverflowed() const {
13961396
StackGuard* stack_guard = isolate_->stack_guard();
1397-
// Stack has overflowed in C++ code only if stack pointer exceeds the C++
1398-
// stack guard and the limits are not set to interrupt values.
1399-
// TODO(214): Stack overflows are ignored if a interrupt is pending. This
1400-
// code should probably always use the initial C++ limit.
1401-
return (reinterpret_cast<uintptr_t>(this) < stack_guard->climit()) &&
1402-
stack_guard->IsStackOverflow();
1397+
return reinterpret_cast<uintptr_t>(this) < stack_guard->real_climit();
14031398
}
14041399
private:
14051400
Isolate* isolate_;

0 commit comments

Comments
 (0)