aboutsummaryrefslogtreecommitdiff
path: root/src/client/linux/handler/exception_handler.h
diff options
context:
space:
mode:
authorthestig@chromium.org <thestig@chromium.org>2014-09-23 20:30:09 +0000
committerthestig@chromium.org <thestig@chromium.org>2014-09-23 20:30:09 +0000
commit37a3b8d997aa22da0f7ec741d443f332f58b3eda (patch)
treef768ce428e4166129af3983a93bfef08388c68a1 /src/client/linux/handler/exception_handler.h
parentFix clang compilation error introduced in r1380. (diff)
downloadbreakpad-37a3b8d997aa22da0f7ec741d443f332f58b3eda.tar.xz
Linux: Call memset() in a couple places in ExceptionHandler to avoid uninit memory reads under Valgrind.
Also move private static variables into the .cc file. BUG=chromium:332335 R=ivanpe@chromium.org Review URL: https://breakpad.appspot.com/5734002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1385 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/client/linux/handler/exception_handler.h')
-rw-r--r--src/client/linux/handler/exception_handler.h15
1 files changed, 4 insertions, 11 deletions
diff --git a/src/client/linux/handler/exception_handler.h b/src/client/linux/handler/exception_handler.h
index bb88b950..591c3108 100644
--- a/src/client/linux/handler/exception_handler.h
+++ b/src/client/linux/handler/exception_handler.h
@@ -30,15 +30,13 @@
#ifndef CLIENT_LINUX_HANDLER_EXCEPTION_HANDLER_H_
#define CLIENT_LINUX_HANDLER_EXCEPTION_HANDLER_H_
-#include <string>
-#include <vector>
-
-#include <pthread.h>
#include <signal.h>
#include <stdint.h>
#include <stdio.h>
#include <sys/ucontext.h>
+#include <string>
+
#include "client/linux/crash_generation/crash_generation_client.h"
#include "client/linux/handler/minidump_descriptor.h"
#include "client/linux/minidump_writer/minidump_writer.h"
@@ -129,7 +127,7 @@ class ExceptionHandler {
ExceptionHandler(const MinidumpDescriptor& descriptor,
FilterCallback filter,
MinidumpCallback callback,
- void *callback_context,
+ void* callback_context,
bool install_handler,
const int server_fd);
~ExceptionHandler();
@@ -228,6 +226,7 @@ class ExceptionHandler {
// Report a crash signal from an SA_SIGINFO signal handler.
bool HandleSignal(int sig, siginfo_t* info, void* uc);
+
private:
// Save the old signal handlers and install new ones.
static bool InstallHandlersLocked();
@@ -258,12 +257,6 @@ class ExceptionHandler {
// believes are never read.
volatile HandlerCallback crash_handler_;
- // The global exception handler stack. This is need becuase there may exist
- // multiple ExceptionHandler instances in a process. Each will have itself
- // registered in this stack.
- static std::vector<ExceptionHandler*> *handler_stack_;
- static pthread_mutex_t handler_stack_mutex_;
-
// We need to explicitly enable ptrace of parent processes on some
// kernels, but we need to know the PID of the cloned process before we
// can do this. We create a pipe which we can use to block the