Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(84)

Unified Diff: runtime/vm/code_generator.cc

Issue 2125053002: Fix crash with OSR after isolate reload. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: move check to right place Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/code_generator.cc
diff --git a/runtime/vm/code_generator.cc b/runtime/vm/code_generator.cc
index 4b572a7cdf8b9258e0c4fbb0736ca30285d25818..e35452829c113b6eec8bf7a8206b9702f3c5dced 100644
--- a/runtime/vm/code_generator.cc
+++ b/runtime/vm/code_generator.cc
@@ -1341,8 +1341,16 @@ DEFINE_RUNTIME_ENTRY(StackOverflow, 0) {
ASSERT(frame != NULL);
const Code& code = Code::ZoneHandle(frame->LookupDartCode());
ASSERT(!code.IsNull());
+ ASSERT(!code.is_optimized());
const Function& function = Function::Handle(code.function());
ASSERT(!function.IsNull());
+
+ // If the code of the frame does not match the function's unoptimized code,
+ // we bail out since the code was reset by an isolate reload.
+ if (code.raw() != function.unoptimized_code()) {
+ return;
+ }
+
// Since the code is referenced from the frame and the ZoneHandle,
// it cannot have been removed from the function.
ASSERT(function.HasCode());
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698