aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormark@chromium.org <mark@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e>2013-01-14 18:53:18 +0000
committermark@chromium.org <mark@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e>2013-01-14 18:53:18 +0000
commit44356b590bbd8f03083f711d14d0fef4a3832334 (patch)
tree02999bf79eeb1ace45b48b70d729b767b90276d3 /src
parentDWARF can store DW_AT_high_pc as either an address or a constant. In the latter (diff)
downloadbreakpad-44356b590bbd8f03083f711d14d0fef4a3832334.tar.xz
ExceptionHandler::HandleSignal
(https://code.google.com/searchframe#OAMlx_jo-ck/src/breakpad/src/client/linux/handler/exception_handler.cc&exact_package=chromium&q=SI_USER&type=cs&l=389) requires si_pid to be equal to getpid() for SI_USER signals. This is a patch by Lei Zhang (thestig@chromium.org) that fixes the issue with Chrome+ASan being unable to upload the crash dump to the crash server when the seccomp sandbox is on. Patch by Alexander Potapenko <glider@chromium.org> Review URL: https://codereview.appspot.com/7066068/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1095 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src')
-rw-r--r--src/client/linux/handler/exception_handler.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/client/linux/handler/exception_handler.cc b/src/client/linux/handler/exception_handler.cc
index e6265a12..e62219d3 100644
--- a/src/client/linux/handler/exception_handler.cc
+++ b/src/client/linux/handler/exception_handler.cc
@@ -415,8 +415,11 @@ bool ExceptionHandler::HandleSignal(int sig, siginfo_t* info, void* uc) {
// This is a public interface to HandleSignal that allows the client to
// generate a crash dump. This function may run in a compromised context.
bool ExceptionHandler::SimulateSignalDelivery(int sig) {
- siginfo_t siginfo;
- my_memset(&siginfo, 0, sizeof(siginfo_t));
+ siginfo_t siginfo = {};
+ // Mimic a trusted signal to allow tracing the process (see
+ // ExceptionHandler::HandleSignal().
+ siginfo.si_code = SI_USER;
+ siginfo.si_pid = getpid();
struct ucontext context;
getcontext(&context);
return HandleSignal(sig, &siginfo, &context);