Skip to content

application.go: Ensure HandlePanicFromNativeCallback captures the pan…#128

Merged
dblohm7 merged 1 commit intomainfrom
aaron/fix_panics
Feb 14, 2025
Merged

application.go: Ensure HandlePanicFromNativeCallback captures the pan…#128
dblohm7 merged 1 commit intomainfrom
aaron/fix_panics

Conversation

@dblohm7
Copy link
Member

@dblohm7 dblohm7 commented Feb 14, 2025

…icking goroutine's stack

When handling a recover, runtime/debug.Stack returns the stack from the panicking goroutine. We save that to an error along with the original value used for the panic, and then panic on that error within the new goroutine.

Fixes #127

…icking goroutine's stack

When handling a recover, runtime/debug.Stack returns the stack from
the panicking goroutine. We save that to an error along with the
original value used for the panic, and then panic on that error within
the new goroutine.

Fixes #127

Signed-off-by: Aaron Klotz <aaron@tailscale.com>
@dblohm7 dblohm7 requested a review from nickkhyl February 14, 2025 21:29
@dblohm7 dblohm7 merged commit 04068c1 into main Feb 14, 2025
2 checks passed
@dblohm7 dblohm7 deleted the aaron/fix_panics branch February 14, 2025 21:39
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.

HandlePanicFromNativeCallback needs to capture panicking stack before redirecting to new goroutine

2 participants