aboutsummaryrefslogtreecommitdiff
path: root/src/processor
diff options
context:
space:
mode:
authorTed Mielczarek <ted@mielczarek.org>2015-11-30 14:05:08 -0500
committerTed Mielczarek <ted@mielczarek.org>2015-11-30 14:05:08 -0500
commit524508ff2f13ad0f5203c47ef4dc2e9aed907a5c (patch)
tree1dca71600fec8c736164fdc9f5033c1bac1d8924 /src/processor
parentRename src/tools/mac/dump_syms binary to dump_syms_mac in autotools build to ... (diff)
downloadbreakpad-524508ff2f13ad0f5203c47ef4dc2e9aed907a5c.tar.xz
Fix ExploitabilityLinuxUtilsTest::DisassembleBytesTest to not fail when temp file ends with 0
R=ivanpe@chromium.org BUG=https://bugs.chromium.org/p/google-breakpad/issues/detail?id=668 Review URL: https://codereview.chromium.org/1482363003 .
Diffstat (limited to 'src/processor')
-rw-r--r--src/processor/exploitability_unittest.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/processor/exploitability_unittest.cc b/src/processor/exploitability_unittest.cc
index 700f9e58..dc5650e3 100644
--- a/src/processor/exploitability_unittest.cc
+++ b/src/processor/exploitability_unittest.cc
@@ -194,8 +194,10 @@ TEST(ExploitabilityLinuxUtilsTest, DisassembleBytesTest) {
std::stringstream objdump_stream;
objdump_stream.str(string(buffer));
string line = "";
- while ((line.find("0:") == string::npos) && getline(objdump_stream, line)) {
+ while ((line.find("<.data>") == string::npos) &&
+ getline(objdump_stream, line)) {
}
+ ASSERT_TRUE(getline(objdump_stream, line));
ASSERT_EQ(line, " 0:\tc7 00 05 00 00 00 \tmov DWORD PTR [rax],0x5");
}