Skip to content

fix(native): use thread state flavor on macOS#1768

Open
bitsandfoxes wants to merge 4 commits into
masterfrom
fix/macos-thread-state-flavor
Open

fix(native): use thread state flavor on macOS#1768
bitsandfoxes wants to merge 4 commits into
masterfrom
fix/macos-thread-state-flavor

Conversation

@bitsandfoxes
Copy link
Copy Markdown
Contributor

@bitsandfoxes bitsandfoxes commented May 29, 2026

Prior, thread_get_state was using the unified MACHINE_THREAD_STATE. The state's header was corrupting every register for non-crashing threads, causing them to show up as unknown. With this change thread_get_state now requests the explicit 64-bit flavor (ARM_THREAD_STATE64/x86_THREAD_STATE64) matching the arm_thread_state64_t destination.

Before

➜  sentry-native git:(master) ./build/sentry_example crash
[sentry] DEBUG crash-safe logs flush
[sentry] DEBUG crash-safe logs flush complete
[sentry] DEBUG crash-safe metrics flush
[sentry] DEBUG crash-safe metrics flush complete

========== Daemon Log (f3f8b51b) ==========
[2026-05-29 15:32:48] INFO initializing curl transport
[2026-05-29 15:32:48] WARN daemon could not acquire run folder lock
[2026-05-29 15:32:48] WARN FP 0xffffffff outside captured stack [0x187e06128 - 0x187e86128]
=========================================
Screenshot 2026-05-29 at 14 51 17

After

➜  sentry-native git:(fix/macos-thread-state-flavor) ./build/sentry_example crash
[sentry] DEBUG crash-safe logs flush
[sentry] DEBUG crash-safe logs flush complete
[sentry] DEBUG crash-safe metrics flush
[sentry] DEBUG crash-safe metrics flush complete

========== Daemon Log (f3f8b741) ==========
[2026-05-29 15:32:01] INFO initializing curl transport
[2026-05-29 15:32:01] WARN daemon could not acquire run folder lock
=========================================
Screenshot 2026-05-29 at 15 16 57

@bitsandfoxes bitsandfoxes requested review from jpnurmi and mujacica May 29, 2026 13:21
@bitsandfoxes
Copy link
Copy Markdown
Contributor Author

This might be related to #1766 @jpnurmi?

@jpnurmi
Copy link
Copy Markdown
Collaborator

jpnurmi commented May 29, 2026

This might be related to #1766 @jpnurmi?

Nice! With both PRs combined, both columns get populated 👏

image

@bitsandfoxes bitsandfoxes changed the title fix: use thread state flavor on macOS fix(native): use thread state flavor on macOS May 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants