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

Issue 1273223004: Fix short jump address calculation in x64 disassembler (Closed)

Created:
5 years, 4 months ago by Cutch
Modified:
5 years, 4 months ago
CC:
reviews_dartlang.org, turnidge, rmacnak, vm-dev_dartlang.org
Base URL:
git@github.com:dart-lang/sdk.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Fix short jump address calculation in x64 disassembler - Make Observatory robust to weird jump addresses. - Use signed address offset when computing short jump target address. R=fschneider@google.com, srdjan@google.com Committed: https://github.com/dart-lang/sdk/commit/a8e2180b781ad82d81206696da220a920310b5db

Patch Set 1 #

Total comments: 4

Patch Set 2 : #

Patch Set 3 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+11 lines, -3 lines) Patch
M runtime/observatory/lib/src/service/object.dart View 1 1 chunk +10 lines, -2 lines 0 comments Download
M runtime/vm/disassembler_x64.cc View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 8 (2 generated)
Cutch
5 years, 4 months ago (2015-08-10 23:49:13 UTC) #2
srdjan
lgtm https://codereview.chromium.org/1273223004/diff/1/runtime/observatory/lib/src/service/object.dart File runtime/observatory/lib/src/service/object.dart (right): https://codereview.chromium.org/1273223004/diff/1/runtime/observatory/lib/src/service/object.dart#newcode3158 runtime/observatory/lib/src/service/object.dart:3158: } You may want to report it to ...
5 years, 4 months ago (2015-08-11 06:17:45 UTC) #3
Florian Schneider
lgtm https://codereview.chromium.org/1273223004/diff/1/runtime/vm/disassembler_x64.cc File runtime/vm/disassembler_x64.cc (right): https://codereview.chromium.org/1273223004/diff/1/runtime/vm/disassembler_x64.cc#newcode880 runtime/vm/disassembler_x64.cc:880: uint8_t b = *(data + 1); Why not ...
5 years, 4 months ago (2015-08-11 08:13:42 UTC) #5
Cutch
https://codereview.chromium.org/1273223004/diff/1/runtime/observatory/lib/src/service/object.dart File runtime/observatory/lib/src/service/object.dart (right): https://codereview.chromium.org/1273223004/diff/1/runtime/observatory/lib/src/service/object.dart#newcode3158 runtime/observatory/lib/src/service/object.dart:3158: } On 2015/08/11 06:17:45, srdjan wrote: > You may ...
5 years, 4 months ago (2015-08-11 13:17:05 UTC) #6
Cutch
Committed patchset #3 (id:40001) manually as a8e2180b781ad82d81206696da220a920310b5db (presubmit successful).
5 years, 4 months ago (2015-08-11 13:18:02 UTC) #7
Florian Schneider
5 years, 4 months ago (2015-08-11 13:20:07 UTC) #8
Message was sent while issue was closed.
On 2015/08/11 13:17:05, Cutch wrote:
>
https://codereview.chromium.org/1273223004/diff/1/runtime/observatory/lib/src...
> File runtime/observatory/lib/src/service/object.dart (right):
> 
>
https://codereview.chromium.org/1273223004/diff/1/runtime/observatory/lib/src...
> runtime/observatory/lib/src/service/object.dart:3158: }
> On 2015/08/11 06:17:45, srdjan wrote:
> > You may want to report it to console that there is an issue with
> > relativeAddress.
> 
> Done.
> 
>
https://codereview.chromium.org/1273223004/diff/1/runtime/vm/disassembler_x64.cc
> File runtime/vm/disassembler_x64.cc (right):
> 
>
https://codereview.chromium.org/1273223004/diff/1/runtime/vm/disassembler_x64...
> runtime/vm/disassembler_x64.cc:880: uint8_t b = *(data + 1);
> On 2015/08/11 08:13:42, Florian Schneider wrote:
> > Why not cast here?
> > 
> > int8_t b = *reinterpret_cast<int8_t*>(data + 1);
> > 
> > or
> > 
> > int8_t b = static_cast<int8_t>(*(data + 1));
> > 
> > should work too.
> > 
> > It seems more natural at the definition, rather than cast at all uses of b
> (even
> > though there is only one here, it is easy to forget).
> 
> The pattern of casting it at use is repeated multiple times in this file. I'm
> going to go with consistency for this CL.

Why not fix the other handful of occurrences? I counted one other place...

Powered by Google App Engine
This is Rietveld 408576698