aboutsummaryrefslogtreecommitdiff
path: root/src/client/linux/handler
diff options
context:
space:
mode:
authorthestig@chromium.org <thestig@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e>2010-08-14 01:41:39 +0000
committerthestig@chromium.org <thestig@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e>2010-08-14 01:41:39 +0000
commitf5c8f6fb61ce609452361ee9b61a343570f62d12 (patch)
tree65726ef8d0093bde007ca244fc6ee349b6f23d83 /src/client/linux/handler
parentMiscellaneous improvements to minidump-2-core. (diff)
downloadbreakpad-f5c8f6fb61ce609452361ee9b61a343570f62d12.tar.xz
Fix a couple of bugs where we generate incorrect minidump files on Linux.o
Patch by Markus Gutschke <markus@chromium.org>. R=thestig Review URL: http://breakpad.appspot.com/150001 Review URL: http://breakpad.appspot.com/155001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@649 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/client/linux/handler')
-rw-r--r--src/client/linux/handler/exception_handler.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/client/linux/handler/exception_handler.cc b/src/client/linux/handler/exception_handler.cc
index 038612f2..6e58ff2c 100644
--- a/src/client/linux/handler/exception_handler.cc
+++ b/src/client/linux/handler/exception_handler.cc
@@ -72,6 +72,7 @@
#include <signal.h>
#include <stdio.h>
#include <sys/mman.h>
+#include <sys/prctl.h>
#include <sys/signal.h>
#include <sys/syscall.h>
#include <sys/ucontext.h>
@@ -268,7 +269,10 @@ void ExceptionHandler::SignalHandler(int sig, siginfo_t* info, void* uc) {
// crashed. The default action for all the signals which we catch is Core, so
// this is the end of us.
signal(sig, SIG_DFL);
- tgkill(getpid(), sys_gettid(), sig);
+
+ // TODO(markus): mask signal and return to caller
+ tgkill(getpid(), syscall(__NR_gettid), sig);
+ _exit(1);
// not reached.
}
@@ -296,7 +300,7 @@ bool ExceptionHandler::HandleSignal(int sig, siginfo_t* info, void* uc) {
return false;
// Allow ourselves to be dumped.
- sys_prctl(PR_SET_DUMPABLE, 1);
+ prctl(PR_SET_DUMPABLE, 1);
CrashContext context;
memcpy(&context.siginfo, info, sizeof(siginfo_t));
memcpy(&context.context, uc, sizeof(struct ucontext));
@@ -309,7 +313,7 @@ bool ExceptionHandler::HandleSignal(int sig, siginfo_t* info, void* uc) {
sizeof(context.float_state));
}
#endif
- context.tid = sys_gettid();
+ context.tid = syscall(__NR_gettid);
if (crash_handler_ != NULL) {
if (crash_handler_(&context, sizeof(context),
callback_context_)) {