From 30d807eea02ede71da44b68d2b23651e962843f5 Mon Sep 17 00:00:00 2001 From: UnknownShadow200 Date: Sun, 11 Aug 2019 13:15:54 +1000 Subject: [PATCH] Remove getcontext usage. This was only used with crashes due to Logger_Abort/Loggert_Abort2. And in those cases, the message and backtrace are what actually matter. --- misc/compile-fixes.md | 11 ----------- src/Logger.c | 7 ------- 2 files changed, 18 deletions(-) diff --git a/misc/compile-fixes.md b/misc/compile-fixes.md index 5bcaf6cfd..3be334755 100644 --- a/misc/compile-fixes.md +++ b/misc/compile-fixes.md @@ -20,17 +20,6 @@ Install ```libexecinfo``` package. Occurs when using musl. #### Undefined reference to 'backtrace' Add ```-lexecinfo``` when compiling. Occurs when using musl. - -#### Undefined reference to 'getcontext' -Occurs when using musl. Change -```C -getcontext(&ctx); -Logger_AbortCommon(result, raw_msg, &ctx); -``` -to -```C -Logger_AbortCommon(result, raw_msg, NULL); -``` Webclient patches --------------------- diff --git a/src/Logger.c b/src/Logger.c index 0518f4674..f96f57bdd 100644 --- a/src/Logger.c +++ b/src/Logger.c @@ -800,14 +800,7 @@ void Logger_Hook(void) { } void Logger_Abort2(ReturnCode result, const char* raw_msg) { -#if defined CC_BUILD_OPENBSD || defined CC_BUILD_ANDROID - /* getcontext is absent on OpenBSD and Android */ Logger_AbortCommon(result, raw_msg, NULL); -#else - ucontext_t ctx; - getcontext(&ctx); - Logger_AbortCommon(result, raw_msg, &ctx); -#endif } #endif