mirror of
https://git.suyu.dev/suyu/breakpad.git
synced 2025-12-26 17:25:04 +01:00
Limit the number of frames we try to walk to prevent runaway processors.
Review URL: http://breakpad.appspot.com/175001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@672 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
parent
64506d2ed7
commit
8e77c078d6
2 changed files with 13 additions and 2 deletions
|
|
@ -48,7 +48,6 @@
|
|||
namespace google_breakpad {
|
||||
|
||||
class CallStack;
|
||||
class CodeModule;
|
||||
class CodeModules;
|
||||
class MemoryRegion;
|
||||
class MinidumpContext;
|
||||
|
|
@ -80,6 +79,9 @@ class Stackwalker {
|
|||
SymbolSupplier *supplier,
|
||||
SourceLineResolverInterface *resolver);
|
||||
|
||||
static void set_max_frames(u_int32_t max_frames) { max_frames_ = max_frames; }
|
||||
static u_int32_t max_frames() { return max_frames_; }
|
||||
|
||||
protected:
|
||||
// system_info identifies the operating system, NULL or empty if unknown.
|
||||
// memory identifies a MemoryRegion that provides the stack memory
|
||||
|
|
@ -146,6 +148,10 @@ class Stackwalker {
|
|||
// this in order to avoid repeatedly looking them up again within
|
||||
// one minidump.
|
||||
set<std::string> no_symbol_modules_;
|
||||
|
||||
// The maximum number of frames Stackwalker will walk through.
|
||||
// This defaults to 1024 to prevent infinite loops.
|
||||
static u_int32_t max_frames_;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue