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

Unified Diff: runtime/observatory/lib/src/service/object.dart

Issue 1273223004: Fix short jump address calculation in x64 disassembler (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 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 | runtime/vm/disassembler_x64.cc » ('j') | runtime/vm/disassembler_x64.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/observatory/lib/src/service/object.dart
diff --git a/runtime/observatory/lib/src/service/object.dart b/runtime/observatory/lib/src/service/object.dart
index 1c6fc0f68b0e326851d3bc2144851b5cd9e2200f..9d479c785053d8fb58a61bad555f8a64469478ed 100644
--- a/runtime/observatory/lib/src/service/object.dart
+++ b/runtime/observatory/lib/src/service/object.dart
@@ -3149,8 +3149,14 @@ class CodeInstruction extends Observable {
if (address == 0) {
return;
}
-
- jumpTarget = instructionsByAddressOffset[address - startAddress];
+ var relativeAddress = address - startAddress;
+ if (relativeAddress < 0) {
+ return;
+ }
+ if (relativeAddress >= instructionsByAddressOffset.length) {
+ return;
+ }
srdjan 2015/08/11 06:17:45 You may want to report it to console that there is
Cutch 2015/08/11 13:17:04 Done.
+ jumpTarget = instructionsByAddressOffset[relativeAddress];
}
}
« no previous file with comments | « no previous file | runtime/vm/disassembler_x64.cc » ('j') | runtime/vm/disassembler_x64.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698