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

Issue 1697963002: Fixing a flaky Linux exploitability unittest. (Closed)

Created:
4 years, 10 months ago by ivanpe
Modified:
4 years, 10 months ago
Reviewers:
Mark Mentovai, mmandlis
CC:
google-breakpad-dev_googlegroups.com
Base URL:
https://chromium.googlesource.com/breakpad/breakpad.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Fixing a flaky Linux exploitability unittest. BUG=https://code.google.com/p/chromium/issues/detail?id=584174 R=mmandlis@chromium.org Committed: https://chromium.googlesource.com/breakpad/breakpad/+/12bd7fc52b66b9f89d38d861a5aed194df03390a

Patch Set 1 #

Total comments: 4

Patch Set 2 : Addressing code review comments. #

Patch Set 3 : Fixing a typo. #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+81 lines, -15 lines) Patch
M src/processor/exploitability_linux.h View 1 1 chunk +7 lines, -0 lines 0 comments Download
M src/processor/exploitability_linux.cc View 1 2 chunks +30 lines, -14 lines 4 comments Download
M src/processor/exploitability_unittest.cc View 1 2 2 chunks +44 lines, -1 line 0 comments Download

Messages

Total messages: 10 (3 generated)
ivanpe
4 years, 10 months ago (2016-02-15 02:59:41 UTC) #3
mmandlis
lgtm Please, address comments before submitting. Thanks! https://codereview.chromium.org/1697963002/diff/1/src/processor/exploitability_linux.h File src/processor/exploitability_linux.h (right): https://codereview.chromium.org/1697963002/diff/1/src/processor/exploitability_linux.h#newcode90 src/processor/exploitability_linux.h:90: // the ...
4 years, 10 months ago (2016-02-16 19:21:16 UTC) #4
ivanpe
https://codereview.chromium.org/1697963002/diff/1/src/processor/exploitability_linux.h File src/processor/exploitability_linux.h (right): https://codereview.chromium.org/1697963002/diff/1/src/processor/exploitability_linux.h#newcode90 src/processor/exploitability_linux.h:90: // the line of the first instruction into |instruction_line|. ...
4 years, 10 months ago (2016-02-16 19:41:43 UTC) #5
mmandlis
lgtm
4 years, 10 months ago (2016-02-16 19:45:00 UTC) #6
ivanpe
Committed patchset #3 (id:40001) manually as 12bd7fc52b66b9f89d38d861a5aed194df03390a (presubmit successful).
4 years, 10 months ago (2016-02-16 19:46:07 UTC) #8
Mark Mentovai
https://codereview.chromium.org/1697963002/diff/40001/src/processor/exploitability_linux.cc File src/processor/exploitability_linux.cc (right): https://codereview.chromium.org/1697963002/diff/40001/src/processor/exploitability_linux.cc#newcode405 src/processor/exploitability_linux.cc:405: if (!getline(objdump_stream, *instruction_line)) { std::getline https://codereview.chromium.org/1697963002/diff/40001/src/processor/exploitability_linux.cc#newcode411 src/processor/exploitability_linux.cc:411: } At ...
4 years, 10 months ago (2016-02-17 02:24:18 UTC) #9
ivanpe
4 years, 10 months ago (2016-02-17 06:27:41 UTC) #10
Message was sent while issue was closed.
https://codereview.chromium.org/1697963002/diff/40001/src/processor/exploitab...
File src/processor/exploitability_linux.cc (right):

https://codereview.chromium.org/1697963002/diff/40001/src/processor/exploitab...
src/processor/exploitability_linux.cc:405: if (!getline(objdump_stream,
*instruction_line)) {
On 2016/02/17 02:24:18, Mark Mentovai wrote:
> std::getline

I'll handle this in a new CL.

https://codereview.chromium.org/1697963002/diff/40001/src/processor/exploitab...
src/processor/exploitability_linux.cc:411: }
On 2016/02/17 02:24:18, Mark Mentovai wrote:
> At some point after seeing <.data>:, if you enter another section without
having
> fallen out of this loop, shouldn’t data_section_seen be set back to false?

Here, we are parsing the output of objdump.  objdump is dissasembling a buffer. 
The buffer length guarantees that there will be at least one instruction.  So
the output should contain exactly one <.data>: section followed by an
instruction line that contains '0:'.  IMO, there is no need to complicate this
function any further.

Powered by Google App Engine
This is Rietveld 408576698