[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 <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
This commit is contained in:
Alexander Markov
2025-03-18 15:57:16 -07:00
committed by Commit Queue
parent 49bf6449d0
commit bbdb840023
3 changed files with 2 additions and 3 deletions
+2 -1
View File
@@ -1828,7 +1828,8 @@ SwitchDispatch:
// Check the interpreter's own stack limit for actual interpreter's stack
// overflows, and also the thread's stack limit for scheduled interrupts.
if (reinterpret_cast<uword>(SP) >= overflow_stack_limit() ||
thread->HasScheduledInterrupts()) {
thread->HasScheduledInterrupts() ||
!thread->os_thread()->HasStackHeadroom()) {
Exit(thread, FP, SP + 1, pc);
INVOKE_RUNTIME(DRT_InterruptOrStackOverflow,
NativeArguments(thread, 0, nullptr, nullptr));
-1
View File
@@ -15,7 +15,6 @@ type_tostring_test: SkipByDesign # Expects names in Type.toString()
[ $compiler == dart2bytecode ]
core_runtime_types_test: SkipByDesign # Contains dynamic calls.
error_stack_trace2_test: Crash
[ $compiler == dartkp ]
bigint_parse_radix_test: Slow, Pass # --no_intrinsify
-1
View File
@@ -30,7 +30,6 @@ vm/type_cast_vm_test: SkipByDesign # Relies on symbol names
[ $compiler == dart2bytecode ]
class_modifiers/trans_legacy/legacy_superdeclaration_test: Crash
const/inference_test: Crash
final/syntax_test/08: Crash
regress/regress45763_test: Crash
vm/reflect_core_vm_test: Crash