From 391b9eeda43fa2c12692b504c9ab9be9ab25a0ad Mon Sep 17 00:00:00 2001 From: Ryan Macnak Date: Mon, 17 Mar 2025 15:28:29 -0700 Subject: [PATCH] [vm] Fix use-after-free of isolate_groups_rwlock_ during shutdown. TEST=ffi/async_void_function_callbacks_test Bug: https://github.com/dart-lang/sdk/issues/53248 Change-Id: I83370f2725f8b8a6bcd2fa1e5ebea2e11ae9606e Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/415982 Commit-Queue: Ryan Macnak Reviewed-by: Alexander Aprelev --- runtime/vm/isolate.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/runtime/vm/isolate.cc b/runtime/vm/isolate.cc index 1b0cb1f2012..cf6e2e39ba5 100644 --- a/runtime/vm/isolate.cc +++ b/runtime/vm/isolate.cc @@ -565,8 +565,7 @@ void IsolateGroup::Shutdown() { Dart::UptimeMillis(), name); } MonitorLocker ml(Isolate::isolate_creation_monitor_); - if (!Isolate::creation_enabled_ && - !IsolateGroup::HasApplicationIsolateGroups()) { + if (!Isolate::creation_enabled_) { ml.Notify(); } if (trace_shutdown) {