Skip to content

Commit 2525e44

Browse files
aamcommit-bot@chromium.org
authored andcommitted
[vm/concurrency] Weaken FixCallersTarget assert so it doesn't crash if target_code has been deactivated just now.
TEST=standalone_2/io/shared_socket_test.dart Fixes #44790 Issue dartbug.com/36097 Change-Id: I5abc17e7d133671a5a335d147a916559256859d7 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/181520 Reviewed-by: Ryan Macnak <[email protected]> Commit-Queue: Alexander Aprelev <[email protected]>
1 parent 27deca1 commit 2525e44

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

runtime/vm/runtime_entry.cc

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2836,7 +2836,11 @@ DEFINE_RUNTIME_ENTRY(FixCallersTarget, 0) {
28362836
current_target_code.EntryPoint(),
28372837
current_target_code.is_optimized() ? "optimized" : "unoptimized");
28382838
}
2839-
ASSERT(!current_target_code.IsDisabled());
2839+
// With isolate groups enabled, it is possible that the target code
2840+
// has been deactivated just now(as a result of re-optimizatin for example),
2841+
// which will result in another run through FixCallersTarget.
2842+
ASSERT(!current_target_code.IsDisabled() ||
2843+
IsolateGroup::AreIsolateGroupsEnabled());
28402844
arguments.SetReturn(current_target_code);
28412845
#else
28422846
UNREACHABLE();
@@ -2882,7 +2886,11 @@ DEFINE_RUNTIME_ENTRY(FixCallersTargetMonomorphic, 0) {
28822886
current_target_code.EntryPoint(),
28832887
current_target_code.is_optimized() ? "optimized" : "unoptimized");
28842888
}
2885-
ASSERT(!current_target_code.IsDisabled());
2889+
// With isolate groups enabled, it is possible that the target code
2890+
// has been deactivated just now(as a result of re-optimizatin for example),
2891+
// which will result in another run through FixCallersTarget.
2892+
ASSERT(!current_target_code.IsDisabled() ||
2893+
IsolateGroup::AreIsolateGroupsEnabled());
28862894
arguments.SetReturn(current_target_code);
28872895
#else
28882896
UNREACHABLE();

0 commit comments

Comments
 (0)