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

Unified Diff: runtime/vm/disassembler_x64.cc

Issue 10915256: FIx crash in disassembler: check that an addrs is tagged before testing it to be part of the heap. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 3 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/disassembler_ia32.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/disassembler_x64.cc
===================================================================
--- runtime/vm/disassembler_x64.cc (revision 12306)
+++ runtime/vm/disassembler_x64.cc (working copy)
@@ -799,7 +799,8 @@
uword addr = reinterpret_cast<uword>(addr_byte_ptr);
AppendToBuffer("%#"Px"", addr);
// Try to print as heap object or stub name
- if (!Isolate::Current()->heap()->CodeContains(addr) &&
+ if (((addr & kSmiTagMask) == kHeapObjectTag) &&
+ !Isolate::Current()->heap()->CodeContains(addr) &&
Isolate::Current()->heap()->Contains(addr - kHeapObjectTag)) {
Object& obj = Object::Handle(reinterpret_cast<RawObject*>(addr));
if (obj.IsArray()) {
« no previous file with comments | « runtime/vm/disassembler_ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698