diff options
author | Dave Cobbley <david.j.cobbley@linux.intel.com> | 2018-08-14 10:05:37 -0700 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2018-08-22 21:26:31 -0400 |
commit | eb8dc40360f0cfef56fb6947cc817a547d6d9bc6 (patch) | |
tree | de291a73dc37168da6370e2cf16c347d1eba9df8 /meta-openembedded/meta-oe/recipes-devtools/breakpad/breakpad/0001-disable-calls-to-getcontext-with-musl.patch | |
parent | 9c3cf826d853102535ead04cebc2d6023eff3032 (diff) | |
download | talos-openbmc-eb8dc40360f0cfef56fb6947cc817a547d6d9bc6.tar.gz talos-openbmc-eb8dc40360f0cfef56fb6947cc817a547d6d9bc6.zip |
[Subtree] Removing import-layers directory
As part of the move to subtrees, need to bring all the import layers
content to the top level.
Change-Id: I4a163d10898cbc6e11c27f776f60e1a470049d8f
Signed-off-by: Dave Cobbley <david.j.cobbley@linux.intel.com>
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'meta-openembedded/meta-oe/recipes-devtools/breakpad/breakpad/0001-disable-calls-to-getcontext-with-musl.patch')
-rw-r--r-- | meta-openembedded/meta-oe/recipes-devtools/breakpad/breakpad/0001-disable-calls-to-getcontext-with-musl.patch | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/meta-openembedded/meta-oe/recipes-devtools/breakpad/breakpad/0001-disable-calls-to-getcontext-with-musl.patch b/meta-openembedded/meta-oe/recipes-devtools/breakpad/breakpad/0001-disable-calls-to-getcontext-with-musl.patch new file mode 100644 index 000000000..c762754ad --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-devtools/breakpad/breakpad/0001-disable-calls-to-getcontext-with-musl.patch @@ -0,0 +1,52 @@ +From 57ecf7205feedd23f901e1bb9d193787e559e433 Mon Sep 17 00:00:00 2001 +From: Andre McCurdy <armccurdy@gmail.com> +Date: Tue, 23 Jan 2018 15:13:26 -0800 +Subject: [PATCH] disable calls to getcontext() with musl + +Signed-off-by: Andre McCurdy <armccurdy@gmail.com> +--- + src/client/linux/handler/exception_handler.cc | 17 +++++++++++++++++ + 1 file changed, 17 insertions(+) + +diff --git a/src/client/linux/handler/exception_handler.cc b/src/client/linux/handler/exception_handler.cc +index cca023f..f3e460c 100644 +--- a/src/client/linux/handler/exception_handler.cc ++++ b/src/client/linux/handler/exception_handler.cc +@@ -495,7 +495,19 @@ bool ExceptionHandler::SimulateSignalDelivery(int sig) { + siginfo.si_code = SI_USER; + siginfo.si_pid = getpid(); + ucontext_t context; ++#if defined(__GLIBC__) + getcontext(&context); ++#else ++ // Extreme hack: Allow musl builds to compile - but don't expect them to work. ++ // Although musl provides a definition for getcontext() in ucontext.h (which ++ // enough to build libbreakpad_client) musl does not provide a corresponding ++ // getcontext() function, so builds will fail when attempting to link anything ++ // with libbreakpad_client. Disabling calls to getcontext() is a temporary ++ // hack. The real fix is probably to enable Breakpad's own implementation of ++ // getcontext() when building for musl (it's currently only enabled when ++ // building for Android). ++ memset (&context, 0, sizeof(context)); ++#endif + return HandleSignal(sig, &siginfo, &context); + } + +@@ -680,9 +692,14 @@ bool ExceptionHandler::WriteMinidump() { + sys_prctl(PR_SET_DUMPABLE, 1, 0, 0, 0); + + CrashContext context; ++#if defined(__GLIBC__) + int getcontext_result = getcontext(&context.context); + if (getcontext_result) + return false; ++#else ++ // Extreme hack - see comments above. ++ memset (&context.context, 0, sizeof(&context.context)); ++#endif + + #if defined(__i386__) + // In CPUFillFromUContext in minidumpwriter.cc the stack pointer is retrieved +-- +1.9.1 + |