runtime: .NET / Golang Interop - Go catching .NET exceptions #30417
Comments
/cc @ianlancetaylor Btw, did you intentionally change the value of rsi ? |
@agnivade, no I did not. RunCallback() in the go portion of the code passes @ianlancetaylor Yes this issue looks like a dup to me. The environment's a bit different, but it's still the same issue. What would an acceptable fix be? I've thought about adding a simple flag that people using Go in a DLL can set to disable Go panics on exceptions like these, but it probably isn't the right fix. |
I think the right fix is for Go's exception handler to pass the exception along to C code, rather than panic. It tries to do that today but apparently it doesn't work. Closing this issue as a dup. |
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?
Ran a C# console application that interacts with a CGO DLL. The code of the .NET program is below
SampleGoInterop.zip
What did you expect to see?
What did you see instead?
I know this is a really rare case, but is there any way we can make .NET exception handling work without having to make local changes to the Golang runtime?
Local changes are in signal_windows.go -- func lastcontinuehandler()
The text was updated successfully, but these errors were encountered: