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

Issue 1676683002: [Courgette] Clean up Disassembler; fix ELF Memory leaks. (Closed)

Created:
4 years, 10 months ago by huangs
Modified:
4 years, 9 months ago
CC:
chromium-reviews, picksi
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Courgette] Clean up Disassembler; fix ELF Memory leaks. Cleaning up code surrounding Disassembler: - Extract AddressTranslator interface to be used across subclasses. - Use FileOffset = size_t by context. - Detailed comments & TODOs in DisassemblerElf32ARM. - Fix DisassemblerElf32ARM memory leaks. - Lots of superficial stylistic changes. Except for AddressTranslator routines and unit tests, shying away from control flow and logic changes. BUG=579206 Committed: https://crrev.com/58b822d441f5c982e879e536fa3c1cbac8fd339a Cr-Commit-Position: refs/heads/master@{#380881} Committed: https://crrev.com/dda11d069213d53aef9bf3bc018b02f3aef7177b Cr-Commit-Position: refs/heads/master@{#380987}

Patch Set 1 #

Total comments: 9

Patch Set 2 : Style cleanup. #

Patch Set 3 : Remove image_end_rva_ from Rel32FinderWin32X86_Basic. #

Patch Set 4 : Sync. #

Total comments: 4

Patch Set 5 : Use Elf32_Half for section indexes. #

Patch Set 6 : git cl format (selective changes). #

Patch Set 7 : Sync. #

Patch Set 8 : Fix WARN_UNUSED_RESULT placement. #

Patch Set 9 : Fix missed uint32_t -> FileOffset replacements. #

Patch Set 10 : Fix signed-unsigned comparisons in tests. #

Patch Set 11 : Fix signed-unsigned comparisons in tests. #

Patch Set 12 : Fix courgette64: offset_in_section need to be FileOffset. #

Patch Set 13 : Param fix for ProgramSegmentHeader(); fix comments. #

Patch Set 14 : Simplify DisassemblerElf32X86Test::TestExe(); more nits. #

Patch Set 15 : Sync. #

Patch Set 16 : Wrap #include <iostream> under #if COURGETTE_HISTOGRAM_TARGETS. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+888 lines, -880 lines) Patch
M courgette/disassembler.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +18 lines, -16 lines 0 comments Download
M courgette/disassembler.cc View 2 chunks +15 lines, -5 lines 0 comments Download
M courgette/disassembler_elf_32.h View 1 2 3 4 5 6 7 8 9 10 11 12 5 chunks +60 lines, -67 lines 0 comments Download
M courgette/disassembler_elf_32.cc View 1 2 3 4 5 6 7 8 9 10 11 12 17 chunks +154 lines, -179 lines 0 comments Download
M courgette/disassembler_elf_32_arm.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +33 lines, -23 lines 0 comments Download
M courgette/disassembler_elf_32_arm.cc View 1 2 3 4 5 6 7 8 9 10 11 12 15 chunks +141 lines, -103 lines 0 comments Download
M courgette/disassembler_elf_32_x86.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +21 lines, -25 lines 0 comments Download
M courgette/disassembler_elf_32_x86.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 6 chunks +56 lines, -55 lines 0 comments Download
M courgette/disassembler_elf_32_x86_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +49 lines, -40 lines 0 comments Download
M courgette/disassembler_win32_x64.h View 1 2 3 4 5 6 7 8 5 chunks +25 lines, -53 lines 0 comments Download
M courgette/disassembler_win32_x64.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 18 chunks +111 lines, -114 lines 0 comments Download
M courgette/disassembler_win32_x64_unittest.cc View 1 2 3 4 5 6 7 8 9 2 chunks +7 lines, -4 lines 0 comments Download
M courgette/disassembler_win32_x86.h View 1 2 3 4 5 6 7 8 5 chunks +25 lines, -50 lines 0 comments Download
M courgette/disassembler_win32_x86.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 15 chunks +108 lines, -109 lines 0 comments Download
M courgette/disassembler_win32_x86_unittest.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +7 lines, -4 lines 0 comments Download
M courgette/image_utils.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +37 lines, -1 line 0 comments Download
M courgette/rel32_finder_win32_x86.h View 1 2 4 chunks +6 lines, -14 lines 0 comments Download
M courgette/rel32_finder_win32_x86.cc View 1 2 3 4 5 5 chunks +14 lines, -16 lines 0 comments Download
M courgette/rel32_finder_win32_x86_unittest.cc View 1 2 1 chunk +1 line, -2 lines 0 comments Download

Messages

Total messages: 57 (28 generated)
huangs
Lots of small changes in Disassembler. Want to get them out of the way before ...
4 years, 10 months ago (2016-02-05 21:15:02 UTC) #3
huangs
https://codereview.chromium.org/1676683002/diff/1/courgette/disassembler.h File courgette/disassembler.h (right): https://codereview.chromium.org/1676683002/diff/1/courgette/disassembler.h#newcode19 courgette/disassembler.h:19: class Disassembler : public AddressTranslator { Going against "composition ...
4 years, 10 months ago (2016-02-05 21:19:05 UTC) #4
grt (UTC plus 2)
a few tiny comments to start with. https://codereview.chromium.org/1676683002/diff/1/courgette/image_utils.h File courgette/image_utils.h (right): https://codereview.chromium.org/1676683002/diff/1/courgette/image_utils.h#newcode29 courgette/image_utils.h:29: using FileOffset ...
4 years, 10 months ago (2016-02-11 16:55:34 UTC) #6
huangs
Updated, still need to remove relocs_start_rva from Rel32FinderWin32X86. https://chromiumcodereview.appspot.com/1676683002/diff/1/courgette/image_utils.h File courgette/image_utils.h (right): https://chromiumcodereview.appspot.com/1676683002/diff/1/courgette/image_utils.h#newcode29 courgette/image_utils.h:29: using ...
4 years, 10 months ago (2016-02-12 01:08:42 UTC) #7
huangs
I meant removing image_end_rva_ from Rel32FinderWin32X86_Basic.
4 years, 10 months ago (2016-02-12 02:21:02 UTC) #8
huangs
Ping for review; PTAL. Thanks!
4 years, 10 months ago (2016-02-26 16:27:20 UTC) #9
huangs
4 years, 9 months ago (2016-02-29 20:44:55 UTC) #11
huangs
Ping reviewers. +andrewhayden@, PTAL ELF and/or ARM -related changes. Thanks!
4 years, 9 months ago (2016-03-08 18:24:09 UTC) #15
Will Harris
lgtm % nits - no functional changes found. Nice restructuring.
4 years, 9 months ago (2016-03-08 19:06:04 UTC) #16
Will Harris
sorry pushed wrong button here are the nits/comments. https://chromiumcodereview.appspot.com/1676683002/diff/60001/courgette/disassembler_elf_32.cc File courgette/disassembler_elf_32.cc (right): https://chromiumcodereview.appspot.com/1676683002/diff/60001/courgette/disassembler_elf_32.cc#newcode107 courgette/disassembler_elf_32.cc:107: SectionBody(static_cast<int>(header_->e_shstrndx))); ...
4 years, 9 months ago (2016-03-08 19:09:07 UTC) #17
huangs
Thanks! https://chromiumcodereview.appspot.com/1676683002/diff/60001/courgette/disassembler_elf_32.cc File courgette/disassembler_elf_32.cc (right): https://chromiumcodereview.appspot.com/1676683002/diff/60001/courgette/disassembler_elf_32.cc#newcode107 courgette/disassembler_elf_32.cc:107: SectionBody(static_cast<int>(header_->e_shstrndx))); Nice! Done. https://chromiumcodereview.appspot.com/1676683002/diff/60001/courgette/disassembler_win32_x64.cc File courgette/disassembler_win32_x64.cc (right): https://chromiumcodereview.appspot.com/1676683002/diff/60001/courgette/disassembler_win32_x64.cc#newcode526 ...
4 years, 9 months ago (2016-03-09 17:53:30 UTC) #18
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1676683002/80002 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1676683002/80002
4 years, 9 months ago (2016-03-09 21:30:46 UTC) #20
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: ios_rel_device_ninja on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_rel_device_ninja/builds/184176)
4 years, 9 months ago (2016-03-09 21:40:22 UTC) #22
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1676683002/130001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1676683002/130001
4 years, 9 months ago (2016-03-09 23:11:18 UTC) #24
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: ios_dbg_simulator_ninja on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_dbg_simulator_ninja/builds/142745) mac_chromium_gn_rel on ...
4 years, 9 months ago (2016-03-09 23:16:56 UTC) #26
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1676683002/150001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1676683002/150001
4 years, 9 months ago (2016-03-10 06:57:42 UTC) #28
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: android_chromium_gn_compile_dbg on tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_chromium_gn_compile_dbg/builds/34232) android_chromium_gn_compile_rel on ...
4 years, 9 months ago (2016-03-10 07:15:34 UTC) #30
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1676683002/170001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1676683002/170001
4 years, 9 months ago (2016-03-10 07:27:20 UTC) #32
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: android_chromium_gn_compile_rel on tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_chromium_gn_compile_rel/builds/34302)
4 years, 9 months ago (2016-03-10 08:03:05 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1676683002/230001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1676683002/230001
4 years, 9 months ago (2016-03-10 18:47:26 UTC) #37
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/194779)
4 years, 9 months ago (2016-03-10 20:13:27 UTC) #39
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1676683002/270001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1676683002/270001
4 years, 9 months ago (2016-03-12 19:46:04 UTC) #43
commit-bot: I haz the power
Committed patchset #15 (id:270001)
4 years, 9 months ago (2016-03-12 20:56:23 UTC) #45
commit-bot: I haz the power
Patchset 15 (id:??) landed as https://crrev.com/58b822d441f5c982e879e536fa3c1cbac8fd339a Cr-Commit-Position: refs/heads/master@{#380881}
4 years, 9 months ago (2016-03-12 20:57:19 UTC) #47
scottmg
A revert of this CL (patchset #15 id:270001) has been created in https://codereview.chromium.org/1792603006/ by scottmg@chromium.org. ...
4 years, 9 months ago (2016-03-12 23:54:19 UTC) #48
huangs
Recommitting.
4 years, 9 months ago (2016-03-14 15:08:49 UTC) #50
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1676683002/290001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1676683002/290001
4 years, 9 months ago (2016-03-14 15:09:26 UTC) #53
commit-bot: I haz the power
Committed patchset #16 (id:290001)
4 years, 9 months ago (2016-03-14 16:35:51 UTC) #55
commit-bot: I haz the power
4 years, 9 months ago (2016-03-14 16:37:40 UTC) #57
Message was sent while issue was closed.
Patchset 16 (id:??) landed as
https://crrev.com/dda11d069213d53aef9bf3bc018b02f3aef7177b
Cr-Commit-Position: refs/heads/master@{#380987}

Powered by Google App Engine
This is Rietveld 408576698