• R/O
  • HTTP
  • SSH
  • HTTPS

thirdparty-breakpad: Commit

Breakpad, a crash reporter, from Google.

Original home: https://chromium.googlesource.com/breakpad/breakpad/


Commit MetaInfo

Révision7e3c165000d44fa153a3270870ed500bc8bbb461 (tree)
l'heure2017-10-31 02:23:56
AuteurNicholas Baldwin <baldwinn@goog...>
CommiterMark Mentovai

Message de Log

Fix double declaration of tgkill when using Android NDK Headers.

As of Android API level 16 tgkill is declared in the NDK version of
signal.h, which conflicts with the static definition found in
src/client/linux/handler/exception_handler.cc. This change removes
the static tgkill definition and replaces its use with sys_tgkill
from the linux syscall support library.

Bug:
Change-Id: Ic70addd8a064cfa36345d86b7e36409e2089e909
Reviewed-on: https://chromium-review.googlesource.com/738912
Reviewed-by: Mike Frysinger <vapier@chromium.org>

Change Summary

Modification

--- a/src/client/linux/handler/exception_handler.cc
+++ b/src/client/linux/handler/exception_handler.cc
@@ -105,12 +105,6 @@
105105 #define PR_SET_PTRACER 0x59616d61
106106 #endif
107107
108-// A wrapper for the tgkill syscall: send a signal to a specific thread.
109-static int tgkill(pid_t tgid, pid_t tid, int sig) {
110- return syscall(__NR_tgkill, tgid, tid, sig);
111- return 0;
112-}
113-
114108 namespace google_breakpad {
115109
116110 namespace {
@@ -400,7 +394,7 @@ void ExceptionHandler::SignalHandler(int sig, siginfo_t* info, void* uc) {
400394 // In order to retrigger it, we have to queue a new signal by calling
401395 // kill() ourselves. The special case (si_pid == 0 && sig == SIGABRT) is
402396 // due to the kernel sending a SIGABRT from a user request via SysRQ.
403- if (tgkill(getpid(), syscall(__NR_gettid), sig) < 0) {
397+ if (sys_tgkill(getpid(), syscall(__NR_gettid), sig) < 0) {
404398 // If we failed to kill ourselves (e.g. because a sandbox disallows us
405399 // to do so), we instead resort to terminating our process. This will
406400 // result in an incorrect exit code.
Afficher sur ancien navigateur de dépôt.