cmd/cgo: C-Shared program crashes with "fatal: morestack g0" #31683
Labels
compiler/runtime
Issues related to the Go compiler and/or runtime.
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
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?
It's a convoluted situation...
I've create a
c-shared
dylib that under the hood is making use CGO to call into another dylib which does make calls back into Go. At the top level of this, I have a written a C program that calls the go library:libbbtevi_add_archive_to_filesystem
is just a wrapper around a Go functionAddISYSArchiveToFilesystem
I also wrote a go program that just calls the
AddISYSArchiveToFilesystem
call directly:What did you expect to see?
Both programs run without error
What did you see instead?
The Go program runs to completion, without issue
The C program crashes with:
if run in
lldb
the following backtrace is available:The text was updated successfully, but these errors were encountered: