summaryrefslogtreecommitdiffstats
path: root/libbacktrace/BacktraceThread.h
diff options
context:
space:
mode:
authorChristopher Ferris <cferris@google.com>2014-05-23 14:46:36 -0700
committerChristopher Ferris <cferris@google.com>2014-05-23 15:11:26 -0700
commite48460762273586744a79d146c2916bcfca7e9e4 (patch)
treebeb8602a347cae64b956a788be8c498de81a02f3 /libbacktrace/BacktraceThread.h
parent818f80045fe4c925a7739a1d1e69e3ebb3a3dbd9 (diff)
downloadsystem_core-e48460762273586744a79d146c2916bcfca7e9e4.zip
system_core-e48460762273586744a79d146c2916bcfca7e9e4.tar.gz
system_core-e48460762273586744a79d146c2916bcfca7e9e4.tar.bz2
Only copy mcontext data from sigcontext.
The ucontext_t data structure could be bigger than the kernel data structure. Since the unwinder only cares about the mcontext data, only copy that out of the structure. The mcontext data is the same size in the kernel and in the ucontext_t structure. Bug: 15189014 Change-Id: I5978169c4425b8212e11db85a57eb319cd0e264b
Diffstat (limited to 'libbacktrace/BacktraceThread.h')
-rw-r--r--libbacktrace/BacktraceThread.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/libbacktrace/BacktraceThread.h b/libbacktrace/BacktraceThread.h
index a75a807..ff3e9f3 100644
--- a/libbacktrace/BacktraceThread.h
+++ b/libbacktrace/BacktraceThread.h
@@ -40,14 +40,12 @@ public:
static void Remove(ThreadEntry* entry);
- inline void CopyUcontext(ucontext_t* ucontext) {
- memcpy(&ucontext_, ucontext, sizeof(ucontext_));
- }
-
void Wake();
void Wait(int);
+ void CopyUcontextFromSigcontext(void*);
+
inline void Lock() {
pthread_mutex_lock(&mutex_);
// Reset the futex value in case of multiple unwinds of the same thread.