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

Issue 1939333002: Write adjusted range back to module (Closed)

Created:
4 years, 7 months ago by michaelbai
Modified:
4 years, 7 months ago
Base URL:
https://chromium.googlesource.com/breakpad/breakpad/src.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Write adjusted range back to module In Android, the mmap could be overlapped by /dev/ashmem, we adjusted the range in https://breakpad.appspot.com/9744002/, but adjusted range isn't written back to module, this caused the corresponding module be dropped in BasicCodeModules copy constructor. This also fix a lot of 'unable to store module' warnings when dumping Android's minidump. BUG=606972 R=mark@chromium.org, wfh@chromium.org Committed: https://chromium.googlesource.com/breakpad/breakpad/+/4f417c8c0ffceb6c2516c6ef00cd91ca5746d852

Patch Set 1 #

Total comments: 5

Patch Set 2 : change to set_base_address_and_size #

Total comments: 4

Patch Set 3 : address comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+13 lines, -0 lines) Patch
M src/google_breakpad/processor/minidump.h View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M src/processor/minidump.cc View 1 2 chunks +8 lines, -0 lines 0 comments Download

Messages

Total messages: 15 (4 generated)
michaelbai
PTAL
4 years, 7 months ago (2016-05-02 22:22:57 UTC) #4
Will Harris
https://codereview.chromium.org/1939333002/diff/1/processor/minidump.cc File processor/minidump.cc (right): https://codereview.chromium.org/1939333002/diff/1/processor/minidump.cc#newcode2645 processor/minidump.cc:2645: module->adjust_base_address_and_size(base_address, module_size); does this only apply to ashmem, or ...
4 years, 7 months ago (2016-05-02 22:25:43 UTC) #5
michaelbai
https://codereview.chromium.org/1939333002/diff/1/processor/minidump.cc File processor/minidump.cc (right): https://codereview.chromium.org/1939333002/diff/1/processor/minidump.cc#newcode2645 processor/minidump.cc:2645: module->adjust_base_address_and_size(base_address, module_size); On 2016/05/02 22:25:43, Will Harris wrote: > ...
4 years, 7 months ago (2016-05-02 22:33:13 UTC) #6
Will Harris
lgtm but wait for mark to take a look https://codereview.chromium.org/1939333002/diff/1/processor/minidump.cc File processor/minidump.cc (right): https://codereview.chromium.org/1939333002/diff/1/processor/minidump.cc#newcode2645 processor/minidump.cc:2645: ...
4 years, 7 months ago (2016-05-02 22:35:24 UTC) #7
Mark Mentovai
https://codereview.chromium.org/1939333002/diff/1/google_breakpad/processor/minidump.h File google_breakpad/processor/minidump.h (right): https://codereview.chromium.org/1939333002/diff/1/google_breakpad/processor/minidump.h#newcode385 google_breakpad/processor/minidump.h:385: void adjust_base_address_and_size(uint64_t base_address, uint64_t size); “Set” instead of “adjust”. ...
4 years, 7 months ago (2016-05-03 04:07:07 UTC) #8
michaelbai
https://codereview.chromium.org/1939333002/diff/1/google_breakpad/processor/minidump.h File google_breakpad/processor/minidump.h (right): https://codereview.chromium.org/1939333002/diff/1/google_breakpad/processor/minidump.h#newcode385 google_breakpad/processor/minidump.h:385: void adjust_base_address_and_size(uint64_t base_address, uint64_t size); On 2016/05/03 04:07:07, Mark ...
4 years, 7 months ago (2016-05-03 19:40:57 UTC) #9
Mark Mentovai
LGTM https://codereview.chromium.org/1939333002/diff/20001/src/google_breakpad/processor/minidump.h File src/google_breakpad/processor/minidump.h (right): https://codereview.chromium.org/1939333002/diff/20001/src/google_breakpad/processor/minidump.h#newcode385 src/google_breakpad/processor/minidump.h:385: // This method is dedicated for the Android ...
4 years, 7 months ago (2016-05-03 20:39:32 UTC) #10
michaelbai
Mark, could you help to land this? I don't have permission. https://codereview.chromium.org/1939333002/diff/20001/src/google_breakpad/processor/minidump.h File src/google_breakpad/processor/minidump.h (right): ...
4 years, 7 months ago (2016-05-03 21:59:19 UTC) #11
Mark Mentovai
LGTM
4 years, 7 months ago (2016-05-03 22:11:26 UTC) #12
Mark Mentovai
Committed patchset #3 (id:40001) manually as 4f417c8c0ffceb6c2516c6ef00cd91ca5746d852 (presubmit successful).
4 years, 7 months ago (2016-05-03 22:14:35 UTC) #14
Primiano Tucci (use gerrit)
4 years, 7 months ago (2016-05-10 17:29:33 UTC) #15
Message was sent while issue was closed.
> In Android, the mmap could be overlapped by /dev/ashmem,
It is not clear to me under which condition this should happen.
The linker is supposed to create guard regions to compensate the breakpad
adjustement for the load bias, to guarantee that that adjusted module does not
overlap with any other module (other than the guard region itself, which is a
null mapping, which breakpad skips).

https://breakpad.appspot.com/9744002/ was about duplicate mappings that overlap
with each other.
Why should they overlap with libchrome.so?

This smells like a linker (better: loader) bug to me.
Can I see a dump of mmaps that cause problems somewhere?

Powered by Google App Engine
This is Rietveld 408576698