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

Issue 2744373004: [Courgette] Fix ELF reference sorting. (Closed)

Created:
3 years, 9 months ago by huangs
Modified:
3 years, 9 months ago
Reviewers:
chrisha, Will Harris
CC:
chromium-reviews, wfh+watch_chromium.org, huangs+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

[Courgette] Fix ELF reference sorting. This CL addresses 2 reference sorting issues in DisassemblerElf32: (1) Bug fix: In ParseFile(), |abs32_locations_| (RVAs) is translated to |abs_offsets| (file offsets), but we sort |abs32_locations_|, which is redundant. Actually we should sort |abs_offsets|. (2) Cleanup: |rel32_relocations_| stores rel32 references sorted by RVA, but in ParseFile() we re-sort these in offset order. Previously Disassemble() optimizes away redundant sorts, but this makes the code less robust. We de-optimize this a little potentially redundant sort-by-RVA, to assert that |rel32_locations_| is sorted by RVA outside of ParseFile(). This CL also makes Disassemble() more uniform, to prepare for refactoring in a follow-up. Meanwhile, DisassemblerWin32 does not experience issue since it assumes RVA order is same as file offset order (this assumption has not has not caused problems so far). BUG=660980 Review-Url: https://codereview.chromium.org/2744373004 Cr-Commit-Position: refs/heads/master@{#458650} Committed: https://chromium.googlesource.com/chromium/src/+/c615c911eea856986f8daaab73b7f30860234009

Patch Set 1 #

Patch Set 2 : Sync. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+16 lines, -11 lines) Patch
M courgette/disassembler_elf_32.cc View 4 chunks +16 lines, -11 lines 0 comments Download

Messages

Total messages: 21 (11 generated)
huangs
Bug fix before more refactoring CLs. PTAL. Thanks!
3 years, 9 months ago (2017-03-14 21:43:07 UTC) #5
chrisha
lgtm
3 years, 9 months ago (2017-03-20 18:31:20 UTC) #6
huangs
Ping wfh@, PTAL. Thanks@
3 years, 9 months ago (2017-03-21 23:19:32 UTC) #8
Will Harris
I looked at this after chris did, and certainly lgtm but did not comment since ...
3 years, 9 months ago (2017-03-21 23:29:31 UTC) #9
Will Harris
when adding two or more reviewers please specify the expectations of each reviewer. thanks.
3 years, 9 months ago (2017-03-21 23:30:00 UTC) #10
huangs
Ah okay. Thanks!
3 years, 9 months ago (2017-03-21 23:31:57 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2744373004/20001
3 years, 9 months ago (2017-03-22 01:53:42 UTC) #14
commit-bot: I haz the power
Try jobs failed on following builders: ios-simulator on master.tryserver.chromium.mac (JOB_TIMED_OUT, build hasn't started yet, builder ...
3 years, 9 months ago (2017-03-22 03:55:25 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2744373004/20001
3 years, 9 months ago (2017-03-22 04:41:53 UTC) #18
commit-bot: I haz the power
3 years, 9 months ago (2017-03-22 06:53:35 UTC) #21
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://chromium.googlesource.com/chromium/src/+/c615c911eea856986f8daaab73b7...

Powered by Google App Engine
This is Rietveld 408576698