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

Issue 664803002: Fix courgette ELF x86 dissembler (Closed)

Created:
6 years, 2 months ago by Will Harris
Modified:
5 years, 9 months ago
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git/+/master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix courgette ELF x86 dissembler Courgette cannot parse files that have out of order NOBITS sections and instead will crash. The solution to this is to skip them and encode them as raw bytes. Also, courgette has a bug where it incorrectly emits ElfRelocationInstruction instructions even when there are no valid R_386_RELATIVE relocations in the file. Added a test file that exhibits both of these symptoms. BUG=424820, 423925 TEST=courgette_unittests R=dgarrett@chromium.org, tommi@chromium.org Committed: https://chromium.googlesource.com/chromium/src/+/3e6fa973958cb37622aa882f2c13b6927228e4fc

Patch Set 1 #

Patch Set 2 : rogue extra line #

Total comments: 2

Patch Set 3 : rebase #

Patch Set 4 : rebase again #

Unified diffs Side-by-side diffs Delta from patch set Stats (+11 lines, -2 lines) Patch
M courgette/disassembler_elf_32.cc View 1 2 2 chunks +3 lines, -2 lines 0 comments Download
M courgette/disassembler_elf_32_x86.cc View 1 chunk +3 lines, -0 lines 0 comments Download
M courgette/encode_decode_unittest.cc View 1 chunk +5 lines, -0 lines 0 comments Download
A courgette/testdata/elf-32-high-bss View 1 2 Binary file 0 comments Download

Messages

Total messages: 17 (4 generated)
Will Harris
6 years, 2 months ago (2014-10-18 03:20:45 UTC) #2
tommi (sloooow) - chröme
I don't have a way to verify that this is correct thing to do unfortunately ...
6 years, 2 months ago (2014-10-20 16:10:16 UTC) #3
dgarrett
On 2014/10/20 16:10:16, tommi wrote: > I don't have a way to verify that this ...
6 years, 2 months ago (2014-10-20 18:11:51 UTC) #4
dgarrett
lgtm https://codereview.chromium.org/664803002/diff/20001/courgette/disassembler_elf_32.cc File courgette/disassembler_elf_32.cc (right): https://codereview.chromium.org/664803002/diff/20001/courgette/disassembler_elf_32.cc#newcode265 courgette/disassembler_elf_32.cc:265: if (section_header->sh_type == SHT_NOBITS) This seems like the ...
6 years, 2 months ago (2014-10-20 18:15:44 UTC) #5
dgarrett
lgtm
6 years, 2 months ago (2014-10-20 18:15:46 UTC) #6
Will Harris
https://codereview.chromium.org/664803002/diff/20001/courgette/disassembler_elf_32.cc File courgette/disassembler_elf_32.cc (right): https://codereview.chromium.org/664803002/diff/20001/courgette/disassembler_elf_32.cc#newcode265 courgette/disassembler_elf_32.cc:265: if (section_header->sh_type == SHT_NOBITS) On 2014/10/20 18:15:44, dgarrett wrote: ...
6 years, 2 months ago (2014-10-20 19:01:44 UTC) #7
dgarrett
My LGTM is still valid here.
5 years, 9 months ago (2015-03-02 18:25:08 UTC) #8
Will Harris
On 2015/03/02 18:25:08, dgarrett wrote: > My LGTM is still valid here. Thanks, now that ...
5 years, 9 months ago (2015-03-02 18:53:46 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/664803002/40001
5 years, 9 months ago (2015-03-02 19:32:23 UTC) #12
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/46685)
5 years, 9 months ago (2015-03-02 20:02:36 UTC) #14
Will Harris
On 2015/03/02 20:02:36, I haz the power (commit-bot) wrote: > Try jobs failed on following ...
5 years, 9 months ago (2015-03-02 21:05:12 UTC) #15
commit-bot: I haz the power
Patchset 4 (id:??) landed as https://crrev.com/3e6fa973958cb37622aa882f2c13b6927228e4fc Cr-Commit-Position: refs/heads/master@{#318764}
5 years, 9 months ago (2015-03-02 21:16:56 UTC) #16
Will Harris
5 years, 9 months ago (2015-03-02 21:17:06 UTC) #17
Message was sent while issue was closed.
Committed patchset #4 (id:60001) manually as
3e6fa973958cb37622aa882f2c13b6927228e4fc (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698