diff options
author | ToshikazuOhiwa <toshikazu_ohiwa@mail.toyota.co.jp> | 2020-03-30 09:24:26 +0900 |
---|---|---|
committer | ToshikazuOhiwa <toshikazu_ohiwa@mail.toyota.co.jp> | 2020-03-30 09:24:26 +0900 |
commit | 5b80bfd7bffd4c20d80b7c70a7130529e9a755dd (patch) | |
tree | b4bb18dcd1487dbf1ea8127e5671b7bb2eded033 /external/meta-openembedded/meta-oe/recipes-devtools/breakpad/breakpad/0001-disable-calls-to-getcontext-with-musl.patch | |
parent | 706ad73eb02caf8532deaf5d38995bd258725cb8 (diff) |
agl-basesystem
Diffstat (limited to 'external/meta-openembedded/meta-oe/recipes-devtools/breakpad/breakpad/0001-disable-calls-to-getcontext-with-musl.patch')
-rw-r--r-- | external/meta-openembedded/meta-oe/recipes-devtools/breakpad/breakpad/0001-disable-calls-to-getcontext-with-musl.patch | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/external/meta-openembedded/meta-oe/recipes-devtools/breakpad/breakpad/0001-disable-calls-to-getcontext-with-musl.patch b/external/meta-openembedded/meta-oe/recipes-devtools/breakpad/breakpad/0001-disable-calls-to-getcontext-with-musl.patch new file mode 100644 index 00000000..bc79727e --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-devtools/breakpad/breakpad/0001-disable-calls-to-getcontext-with-musl.patch @@ -0,0 +1,49 @@ +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(+) + +Index: git/src/client/linux/handler/exception_handler.cc +=================================================================== +--- git.orig/src/client/linux/handler/exception_handler.cc ++++ git/src/client/linux/handler/exception_handler.cc +@@ -495,7 +495,19 @@ bool ExceptionHandler::SimulateSignalDel + 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 |