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

Issue 1658463002: [Courgette] Fix AssemblyProgram parsing for ELF-ARM. (Closed)

Created:
4 years, 10 months ago by huangs
Modified:
4 years, 10 months ago
Reviewers:
chrisha, Will Harris
CC:
chromium-reviews, Andrew Hayden (chromium.org), picksi1
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Courgette] Fix AssemblyProgram parsing for ELF-ARM. This fixes two problems: (A) In DisassemblerElf32, RVAToFileOffset() used Program Segment Header, but FileOffsetToRVA() used Section Header. For consistency, both should use the same one. We choose the latter (for now). (B) Even if a section has sh_type=SHT_PROGBITS, it can still have sh_addr=0. Extracting Rel32 address from these sections would add overlapping RVA chaos, and so should be avoided. Also using elf-arm7 in a unit test. The test fails before the fix and passes after. BUG=579206 Committed: https://crrev.com/7ec152caaf55f64431dcb2c63cc052890c4a93f1 Cr-Commit-Position: refs/heads/master@{#373639}

Patch Set 1 #

Patch Set 2 : Sync. #

Patch Set 3 : Add ELF-ARM case to EncodeDecodeTest. #

Total comments: 2

Patch Set 4 : Remove unused DisassemblerElf32 accessors. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+20 lines, -40 lines) Patch
M courgette/disassembler_elf_32.h View 1 2 3 2 chunks +0 lines, -24 lines 0 comments Download
M courgette/disassembler_elf_32.cc View 2 chunks +15 lines, -16 lines 0 comments Download
M courgette/encode_decode_unittest.cc View 1 2 1 chunk +5 lines, -0 lines 0 comments Download

Messages

Total messages: 34 (15 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1658463002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1658463002/1
4 years, 10 months ago (2016-01-31 05:22:02 UTC) #3
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 10 months ago (2016-01-31 06:28:20 UTC) #6
huangs
PTAL. Thanks!
4 years, 10 months ago (2016-02-01 13:19:32 UTC) #8
Will Harris
On 2016/02/01 13:19:32, huangs wrote: > PTAL. Thanks! both look like good fixes but can ...
4 years, 10 months ago (2016-02-01 19:05:10 UTC) #9
huangs
That's a good idea, though it looks like trivial ELF executables don't trigger the bug. ...
4 years, 10 months ago (2016-02-02 17:41:16 UTC) #10
huangs
Will need to rethink the fix. Meanwhile, test binary is added in http://crrev.com/1662633002/.
4 years, 10 months ago (2016-02-02 21:07:20 UTC) #11
huangs
Added the test, and verified that before fix the test would fail (error code 25). ...
4 years, 10 months ago (2016-02-04 18:39:07 UTC) #12
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1658463002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1658463002/40001
4 years, 10 months ago (2016-02-04 18:39:52 UTC) #14
Will Harris
https://codereview.chromium.org/1658463002/diff/40001/courgette/disassembler_elf_32.cc File courgette/disassembler_elf_32.cc (left): https://codereview.chromium.org/1658463002/diff/40001/courgette/disassembler_elf_32.cc#oldcode170 courgette/disassembler_elf_32.cc:170: Elf32_Addr begin = ProgramSegmentMemoryBegin(i); are ProgramSegmentMemoryBegin and ProgramSegmentMemorySize needed ...
4 years, 10 months ago (2016-02-04 18:54:21 UTC) #15
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 10 months ago (2016-02-04 19:56:41 UTC) #17
huangs
Updated, PTAL. https://codereview.chromium.org/1658463002/diff/40001/courgette/disassembler_elf_32.cc File courgette/disassembler_elf_32.cc (left): https://codereview.chromium.org/1658463002/diff/40001/courgette/disassembler_elf_32.cc#oldcode170 courgette/disassembler_elf_32.cc:170: Elf32_Addr begin = ProgramSegmentMemoryBegin(i); Ah good catch. ...
4 years, 10 months ago (2016-02-04 20:13:50 UTC) #18
Will Harris
lgtm
4 years, 10 months ago (2016-02-04 20:37:26 UTC) #19
huangs
Thanks! Committing.
4 years, 10 months ago (2016-02-04 21:09:42 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1658463002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1658463002/60001
4 years, 10 months ago (2016-02-04 21:11:49 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1658463002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1658463002/60001
4 years, 10 months ago (2016-02-04 21:43:04 UTC) #25
huangs
Hmm I said I would rethink this bug, but I think it's good to get ...
4 years, 10 months ago (2016-02-04 21:43:07 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1658463002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1658463002/60001
4 years, 10 months ago (2016-02-04 22:14:43 UTC) #30
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 10 months ago (2016-02-04 22:26:50 UTC) #32
commit-bot: I haz the power
4 years, 10 months ago (2016-02-04 22:27:48 UTC) #34
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/7ec152caaf55f64431dcb2c63cc052890c4a93f1
Cr-Commit-Position: refs/heads/master@{#373639}

Powered by Google App Engine
This is Rietveld 408576698