Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ref: Disable Async Stacktraces #1087

Merged
merged 1 commit into from
Apr 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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