Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
cmd/cgo: compiling with -dynlink on darwin/amd64 causes segfault #19701
I'm not sure whether this is supposed to work or not, but on darwin/amd64, this causes a segfault:
$ go build -a -gcflags="-dynlink" std cmd go build runtime/cgo: /var/folders/1t/n61cbvls5bl293bbb0zyypqw0000gn/T/go-build113212789/cmd/cgo/_obj/exe/a.out: signal: segmentation fault
I encountered this while trying to manually test some compiler changes touching code protected by Ctxt.Flag_dynlink.
I think it's a binary compiled by a c compiler.
Anyway, if it's not expected to work, there's probably no bug here. Maybe a rejection from cmd/go would be useful, although it'd have to parse -gcflags, and really, who sets -gcflags=-dynlink but me? :)
Closing for now. Feel free to re-open if you see anything worth doing.