Skip to content
Permalink
Browse files

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.
  • Loading branch information...
UnknownShadow200 committed Aug 11, 2019
1 parent 3d82f65 commit 30d807eea02ede71da44b68d2b23651e962843f5
Showing with 0 additions and 18 deletions.
  1. +0 −11 misc/compile-fixes.md
  2. +0 −7 src/Logger.c
@@ -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
---------------------
@@ -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

0 comments on commit 30d807e

Please sign in to comment.
You can’t perform that action at this time.