Skip to content

Commit

Permalink
ref: Disable Async Stacktraces
Browse files Browse the repository at this point in the history
Due to some problems with arm64 devices, we disable this feature until we find out how to fix them.
We don't want this feature to block 7.0.0 GA. The plan is to add a flag to SentryOptions for enabling
and disabling this feature in the future, see #1086.
  • Loading branch information
philipphofmann committed Apr 27, 2021
1 parent ce298f2 commit 501fa3b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## Unreleased

- ref: Disable Async Stacktraces (#1087)

## 7.0.0-beta.1

### Features and Fixes
Expand Down
3 changes: 2 additions & 1 deletion Sources/Sentry/SentryCrashIntegration.m
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ - (void)installWithOptions:(nonnull SentryOptions *)options
outOfMemoryLogic:logic];

[self startCrashHandler];
sentrycrash_install_async_hooks();
// TODO: enable with feature flag from SentryOptions because this is still experimental
// sentrycrash_install_async_hooks();
[self configureScope];
}

Expand Down
11 changes: 7 additions & 4 deletions Sources/SentryCrash/Recording/Tools/SentryHook.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,14 @@ static pthread_key_t async_caller_key = 0;
sentrycrash_async_backtrace_t *
sentrycrash_get_async_caller_for_thread(SentryCrashThread thread)
{
const pthread_t pthread = pthread_from_mach_thread_np((thread_t)thread);
void **tsd_slots = (void *)((uint8_t *)pthread + TSD_OFFSET);
return NULL;

return (sentrycrash_async_backtrace_t *)__atomic_load_n(
&tsd_slots[async_caller_key], __ATOMIC_SEQ_CST);
// TODO: Disabled because still experimental.
// const pthread_t pthread = pthread_from_mach_thread_np((thread_t)thread);
// void **tsd_slots = (void *)((uint8_t *)pthread + TSD_OFFSET);
//
// return (sentrycrash_async_backtrace_t *)__atomic_load_n(
// &tsd_slots[async_caller_key], __ATOMIC_SEQ_CST);
}

void
Expand Down

0 comments on commit 501fa3b

Please sign in to comment.