Add API to skip dump if crashing thread doesn't reference a given module

This CL makes it possible to skip a dump if the crashing thread doesn't
have any pointers to a given module. The concrete use case is WebView
where we would like to skip generating microdump output when webview
is unreferenced by the stack and thus cannot be responsible for the
crash in a way that would be debuggable.

The range of interesting addresses is chosen by examining the process
mappings to find the one that contains a pointer that is known to be in
the right shared object (i.e. an appropriately chosen function pointer)
passed from the client.

If the extracted stack does not contain a pointer in this range, then we
do not generate a microdump. If the stack extraction fails, we still
generate a microdump (without a stack).

BUG=664460

Change-Id: If19406a13168264f7751245fc39591bd6cdbf5df
Reviewed-on: https://chromium-review.googlesource.com/419476
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Reviewed-by: Primiano Tucci <primiano@chromium.org>
This commit is contained in:
Tobias Sargeant 2017-01-18 15:19:51 +00:00 committed by Tobias Sargeant
parent c2d969cb10
commit 833cadc0a1
10 changed files with 149 additions and 62 deletions

View file

@ -40,23 +40,11 @@ struct MicrodumpExtraInfo {
const char* gpu_fingerprint;
const char* process_type;
// |interest_range_start| and |interest_range_end| specify a range
// in the target process address space. Microdumps are only
// generated if the PC or a word on the captured stack point into
// this range, or |suppress_microdump_based_on_interest_range| is
// false.
bool suppress_microdump_based_on_interest_range;
uintptr_t interest_range_start;
uintptr_t interest_range_end;
MicrodumpExtraInfo()
: build_fingerprint(NULL),
product_info(NULL),
gpu_fingerprint(NULL),
process_type(NULL),
suppress_microdump_based_on_interest_range(false),
interest_range_start(0),
interest_range_end(0) {}
process_type(NULL) {}
};
}