Add new flag to allow granular control over the use of objdump.

This adds a new flag `enable_objdump_for_exploitability_` to the
MinidumpProcessor, which allows enabling objdump separately for crash
address fixups and for exploitability analysis, as the performance cost
of the exploitability analysis is significantly higher.

Change-Id: I667ffdce7cc0a970793f91413c3d2e3af93f4247
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/4507067
Reviewed-by: Ivan Penkov <ivanpe@google.com>
Reviewed-by: Ivan Penkov <ivanpe@chromium.org>
This commit is contained in:
Mark Brand 2023-05-09 14:31:56 +02:00 committed by Ivan Penkov
parent f4a3b346f3
commit 463ae7cd60
3 changed files with 21 additions and 6 deletions

View file

@ -126,8 +126,18 @@ class MinidumpProcessor {
// does not exist or cannot be determined.
static string GetAssertion(Minidump* dump);
// Sets the flag to enable/disable use of objdump during normal crash
// processing. This is independent from the flag for use of objdump during
// exploitability analysis.
void set_enable_objdump(bool enabled) { enable_objdump_ = enabled; }
// Sets the flag to enable/disable use of objdump during exploitability
// analysis. This is independent from the flag for use of objdump during
// normal crash processing.
void set_enable_objdump_for_exploitability(bool enabled) {
enable_objdump_for_exploitability_ = enabled;
}
private:
StackFrameSymbolizer* frame_symbolizer_;
// Indicate whether resolver_helper_ is owned by this instance.
@ -138,9 +148,15 @@ class MinidumpProcessor {
// memory corruption issue.
bool enable_exploitability_;
// This flag permits the exploitability scanner to shell out to objdump
// for purposes of disassembly.
// This flag permits the processor to shell out to objdump for purposes of
// disassembly during normal crash processing, but not during exploitability
// analysis.
bool enable_objdump_;
// This flag permits the exploitability scanner to shell out to objdump for
// purposes of disassembly. This results in significantly more overhead than
// the enable_objdump_ flag.
bool enable_objdump_for_exploitability_;
};
} // namespace google_breakpad