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

Unified Diff: runtime/vm/raw_object_snapshot.cc

Issue 1264683002: Fix crash when reading the Richards snapshot generated on using a the 32 bit dart binary. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 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/raw_object_snapshot.cc
diff --git a/runtime/vm/raw_object_snapshot.cc b/runtime/vm/raw_object_snapshot.cc
index 26bac91ad44d6a76e46074eff7f160dd6db64581..85c5d748af480a460a492393a78e32b5f4878448 100644
--- a/runtime/vm/raw_object_snapshot.cc
+++ b/runtime/vm/raw_object_snapshot.cc
@@ -1830,7 +1830,10 @@ RawInteger* Mint::ReadFrom(SnapshotReader* reader,
// Check if the value could potentially fit in a Smi in our current
// architecture, if so return the object as a Smi.
if (Smi::IsValid(value)) {
- return Smi::New(static_cast<intptr_t>(value));
+ Smi& smi = Smi::ZoneHandle(reader->zone(),
+ Smi::New(static_cast<intptr_t>(value)));
+ reader->AddBackRef(object_id, &smi, kIsDeserialized);
+ return smi.raw();
}
// Create a Mint object or get canonical one if it is a canonical constant.
« 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