aboutsummaryrefslogtreecommitdiff
path: root/src/processor/synth_minidump.cc
diff options
context:
space:
mode:
authorOrgad Shaneh <orgads@gmail.com>2016-11-19 20:49:04 +0200
committerMike Frysinger <vapier@chromium.org>2016-12-06 13:58:40 +0000
commit87e444e17df82a7b8fb9a2cfe6968a0fffb46df0 (patch)
tree15d100f941bc9eb4753387fee27784aaaf025844 /src/processor/synth_minidump.cc
parentDo not generate a microdump if there are no webview pointers on the stack. (diff)
downloadbreakpad-87e444e17df82a7b8fb9a2cfe6968a0fffb46df0.tar.xz
Remove comparison of this with nullptr
GCC6 optimizes it out, leading to crash. Change-Id: I8425d456c1364929d135ce3860121b8098bab1f7 Reviewed-on: https://chromium-review.googlesource.com/413120 Reviewed-by: Mike Frysinger <vapier@chromium.org>
Diffstat (limited to 'src/processor/synth_minidump.cc')
-rw-r--r--src/processor/synth_minidump.cc15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/processor/synth_minidump.cc b/src/processor/synth_minidump.cc
index 2cfbb088..ade150ef 100644
--- a/src/processor/synth_minidump.cc
+++ b/src/processor/synth_minidump.cc
@@ -41,10 +41,7 @@ Section::Section(const Dump &dump)
: test_assembler::Section(dump.endianness()) { }
void Section::CiteLocationIn(test_assembler::Section *section) const {
- if (this)
- (*section).D32(size_).D32(file_offset_);
- else
- (*section).D32(0).D32(0);
+ (*section).D32(size_).D32(file_offset_);
}
void Stream::CiteStreamIn(test_assembler::Section *section) const {
@@ -272,8 +269,14 @@ Module::Module(const Dump &dump,
D32(version_info.file_subtype);
D32(version_info.file_date_hi);
D32(version_info.file_date_lo);
- cv_record->CiteLocationIn(this);
- misc_record->CiteLocationIn(this);
+ if (cv_record)
+ cv_record->CiteLocationIn(this);
+ else
+ D32(0).D32(0);
+ if (misc_record)
+ misc_record->CiteLocationIn(this);
+ else
+ D32(0).D32(0);
D64(0).D64(0);
}