mirror of
https://git.suyu.dev/suyu/breakpad.git
synced 2025-12-27 01:35:06 +01:00
Server-side workaround to handle overlapping modules.
This change is resolving an issue that was caused by the combination of: - Android system libraries being relro packed in N+. - Breakpad dealing with relro packed libraries in a hack way. This is a fix for http://crbug/611824. I also found an use-after-free issue (bug in Minidump::SeekToStreamType). I disallowed the MinidumpStreamInfo copy and assign constructors and the compiler detected another similar issue in Minidump::Print. Then I disabled the copy and assign constructors for most classes in minidump.h (just in case). There are a couple of classes where I couldn't disallow them (since assign is used). This will require a small refactor so I left it out of this CL. R=mark@chromium.org Review URL: https://codereview.chromium.org/2060663002 .
This commit is contained in:
parent
67f738b7ad
commit
24f5931c5e
18 changed files with 239 additions and 39 deletions
|
|
@ -57,6 +57,7 @@ class BasicCodeModule : public CodeModule {
|
|||
explicit BasicCodeModule(const CodeModule *that)
|
||||
: base_address_(that->base_address()),
|
||||
size_(that->size()),
|
||||
shrink_down_delta_(that->shrink_down_delta()),
|
||||
code_file_(that->code_file()),
|
||||
code_identifier_(that->code_identifier()),
|
||||
debug_file_(that->debug_file()),
|
||||
|
|
@ -64,18 +65,19 @@ class BasicCodeModule : public CodeModule {
|
|||
version_(that->version()) {}
|
||||
|
||||
BasicCodeModule(uint64_t base_address, uint64_t size,
|
||||
const string &code_file,
|
||||
const string &code_identifier,
|
||||
const string &debug_file,
|
||||
const string &debug_identifier,
|
||||
const string &version)
|
||||
: base_address_(base_address),
|
||||
size_(size),
|
||||
code_file_(code_file),
|
||||
code_identifier_(code_identifier),
|
||||
debug_file_(debug_file),
|
||||
debug_identifier_(debug_identifier),
|
||||
version_(version)
|
||||
const string &code_file,
|
||||
const string &code_identifier,
|
||||
const string &debug_file,
|
||||
const string &debug_identifier,
|
||||
const string &version)
|
||||
: base_address_(base_address),
|
||||
size_(size),
|
||||
shrink_down_delta_(0),
|
||||
code_file_(code_file),
|
||||
code_identifier_(code_identifier),
|
||||
debug_file_(debug_file),
|
||||
debug_identifier_(debug_identifier),
|
||||
version_(version)
|
||||
{}
|
||||
virtual ~BasicCodeModule() {}
|
||||
|
||||
|
|
@ -83,16 +85,21 @@ class BasicCodeModule : public CodeModule {
|
|||
// members.
|
||||
virtual uint64_t base_address() const { return base_address_; }
|
||||
virtual uint64_t size() const { return size_; }
|
||||
virtual uint64_t shrink_down_delta() const { return shrink_down_delta_; }
|
||||
virtual void SetShrinkDownDelta(uint64_t shrink_down_delta) {
|
||||
shrink_down_delta_ = shrink_down_delta;
|
||||
}
|
||||
virtual string code_file() const { return code_file_; }
|
||||
virtual string code_identifier() const { return code_identifier_; }
|
||||
virtual string debug_file() const { return debug_file_; }
|
||||
virtual string debug_identifier() const { return debug_identifier_; }
|
||||
virtual string version() const { return version_; }
|
||||
virtual const CodeModule* Copy() const { return new BasicCodeModule(this); }
|
||||
virtual CodeModule* Copy() const { return new BasicCodeModule(this); }
|
||||
|
||||
private:
|
||||
uint64_t base_address_;
|
||||
uint64_t size_;
|
||||
uint64_t shrink_down_delta_;
|
||||
string code_file_;
|
||||
string code_identifier_;
|
||||
string debug_file_;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue