Skip to content
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
- Native: don't dump the crash daemon's log to `stderr` on shutdown unless debug logging is enabled, so terminal applications stay quiet when `debug` is off. ([#1910](https://github.com/getsentry/sentry-native/pull/1910))
- Native/Windows: capture heap corruption crashes reported as `STATUS_HEAP_CORRUPTION` (`0xC0000374`). ([#1909](https://github.com/getsentry/sentry-native/pull/1909))
- Native/Linux: add support for `sentry_options_set_handler_strategy(SENTRY_HANDLER_STRATEGY_CHAIN_AT_START)`. ([#1912](https://github.com/getsentry/sentry-native/pull/1912))
- Windows: the default thread stack guarantee is now actually applied in static builds and is also set by the native backend, so crash handling can run after a stack overflow. ([#1918](https://github.com/getsentry/sentry-native/pull/1918))

## 0.15.4

Expand Down
5 changes: 5 additions & 0 deletions src/backends/sentry_backend_native.c
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,11 @@ native_backend_startup(
"development.");
SENTRY_DEBUG("starting native backend");

#if defined(SENTRY_PLATFORM_WINDOWS) && !defined(SENTRY_BUILD_SHARED) \
&& defined(SENTRY_THREAD_STACK_GUARANTEE_AUTO_INIT)
sentry__set_default_thread_stack_guarantee();
#endif

#if defined(SENTRY_PLATFORM_WINDOWS)
// Create process-wide mutex for IPC synchronization (Windows)
// Use portable mutex to protect Windows mutex creation
Expand Down
14 changes: 7 additions & 7 deletions src/sentry_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,13 @@ sentry_init(sentry_options_t *options)

uint64_t last_crash = 0;

#if defined(SENTRY_PLATFORM_WINDOWS) \
&& (!defined(SENTRY_BUILD_SHARED) || defined(SENTRY_PLATFORM_XBOX))
// This function must be positioned so that any dependents on its cached
// functions are invoked after it.
sentry__init_cached_kernel32_functions();
#endif

// and then we will start the backend, since it requires a valid run
sentry_backend_t *backend = options->backend;
if (backend && backend->startup_func) {
Expand Down Expand Up @@ -253,13 +260,6 @@ sentry_init(sentry_options_t *options)
backend->user_consent_changed_func(backend);
}

#if defined(SENTRY_PLATFORM_WINDOWS) \
&& (!defined(SENTRY_BUILD_SHARED) || defined(SENTRY_PLATFORM_XBOX))
// This function must be positioned so that any dependents on its cached
// functions are invoked after it.
sentry__init_cached_kernel32_functions();
#endif

// after initializing the transport, we will submit all the unsent envelopes
// and handle remaining sessions.
SENTRY_DEBUG("processing and pruning old runs");
Expand Down
Loading