Skip to content

Commit bbdb840

Browse files
alexmarkovCommit Queue
authored andcommitted
[vm, dynamic_modules] Handle native stack overflow in the interpreter
TEST=corelib/error_stack_trace2_test Change-Id: I337c15eecddccbe770158fa493bf296c171f9f08 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/415940 Reviewed-by: Slava Egorov <[email protected]> Commit-Queue: Alexander Markov <[email protected]>
1 parent 49bf644 commit bbdb840

File tree

3 files changed

+2
-3
lines changed

3 files changed

+2
-3
lines changed

runtime/vm/interpreter.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1828,7 +1828,8 @@ ObjectPtr Interpreter::Run(Thread* thread,
18281828
// Check the interpreter's own stack limit for actual interpreter's stack
18291829
// overflows, and also the thread's stack limit for scheduled interrupts.
18301830
if (reinterpret_cast<uword>(SP) >= overflow_stack_limit() ||
1831-
thread->HasScheduledInterrupts()) {
1831+
thread->HasScheduledInterrupts() ||
1832+
!thread->os_thread()->HasStackHeadroom()) {
18321833
Exit(thread, FP, SP + 1, pc);
18331834
INVOKE_RUNTIME(DRT_InterruptOrStackOverflow,
18341835
NativeArguments(thread, 0, nullptr, nullptr));

tests/corelib/corelib.status

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ type_tostring_test: SkipByDesign # Expects names in Type.toString()
1515

1616
[ $compiler == dart2bytecode ]
1717
core_runtime_types_test: SkipByDesign # Contains dynamic calls.
18-
error_stack_trace2_test: Crash
1918

2019
[ $compiler == dartkp ]
2120
bigint_parse_radix_test: Slow, Pass # --no_intrinsify

tests/language/language.status

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ vm/type_cast_vm_test: SkipByDesign # Relies on symbol names
3030
[ $compiler == dart2bytecode ]
3131
class_modifiers/trans_legacy/legacy_superdeclaration_test: Crash
3232
const/inference_test: Crash
33-
final/syntax_test/08: Crash
3433
regress/regress45763_test: Crash
3534
vm/reflect_core_vm_test: Crash
3635

0 commit comments

Comments
 (0)