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

Unified Diff: runtime/vm/deopt_instructions.cc

Issue 1847623002: Ensure deoptimizing frames have a valid pc marker before deferred materialization. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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 | « runtime/vm/code_generator.cc ('k') | runtime/vm/stub_code.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/deopt_instructions.cc
diff --git a/runtime/vm/deopt_instructions.cc b/runtime/vm/deopt_instructions.cc
index 8b0aa722c8b1911d4f1a0ecfaf99734309da24f9..fffd6673c31eb5da0223848113d92a037156283a 100644
--- a/runtime/vm/deopt_instructions.cc
+++ b/runtime/vm/deopt_instructions.cc
@@ -666,9 +666,14 @@ class DeoptPcMarkerInstr : public DeoptInstr {
return;
}
- *dest_addr = reinterpret_cast<intptr_t>(Object::null());
- deopt_context->DeferPcMarkerMaterialization(
- object_table_index_, dest_addr);
+ // We don't always have the Code object for the frame's corresponding
+ // unoptimized code as it may have been collected. Use a stub as the pc
+ // marker until we can recreate that Code object during deferred
+ // materialization to maintain the invariant that Dart frames always have
+ // a pc marker.
+ *reinterpret_cast<RawObject**>(dest_addr) =
+ StubCode::FrameAwaitingMaterialization_entry()->code();
+ deopt_context->DeferPcMarkerMaterialization(object_table_index_, dest_addr);
}
private:
« no previous file with comments | « runtime/vm/code_generator.cc ('k') | runtime/vm/stub_code.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698