-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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
cgo: SetUnhandledExceptionFilter is broken when using CGO on Windows x64 #50951
Comments
I have made an implementation that uses static linkage instead of dynamic. The branch is named |
Change https://go.dev/cl/525475 mentions this issue: |
It looks like unhandled exception can't flow to the callback defined by The fix doesn't apply to windows/arm64, as it still doesn't support SEH unwinding, which is required to unwind the cgo stack (see #57302) |
Change https://go.dev/cl/548319 mentions this issue: |
For #50951. For #61422. Change-Id: Ib9038a00de8f4d8606443e9acd414402023cde63 Reviewed-on: https://go-review.googlesource.com/c/go/+/548319 Reviewed-by: Alex Brainman <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Bryan Mills <[email protected]> Reviewed-by: Cherry Mui <[email protected]>
For golang#50951. For golang#61422. Change-Id: Ib9038a00de8f4d8606443e9acd414402023cde63 Reviewed-on: https://go-review.googlesource.com/c/go/+/548319 Reviewed-by: Alex Brainman <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Bryan Mills <[email protected]> Reviewed-by: Cherry Mui <[email protected]>
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
The issue seems to be present on x64, but not on x86. This could be related to the differences between how x86 and x64 handles exceptions: https://sourceforge.net/p/mingw-w64/support-requests/29/
I have made a sample project to make it easier to test this issue: https://github.com/arg0d/sentryProblem
The gist of it is:
SetUnhandledExceptionFilter
What did you expect to see?
Exception filter set by
SetUnhandledExceptionFilter
is invoked after the other library has raised an exception.What did you see instead?
Exception filter set by
SetUnhandledExceptionFilter
did not get invoked when the other library raised an exception.The text was updated successfully, but these errors were encountered: