profile
viewpoint

Ask questionscmd/compile: illegal instruction (core dumped) on FreeBSD ARM64

What version of Go are you using? 1.14rc1

<pre> go version go1.14rc1 darwin/amd64 </pre>

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

<details><summary><code>go env</code> Output</summary><br><pre> GO111MODULE="" GOARCH="amd64" GOBIN="" GOCACHE="/Users/artooro/Library/Caches/go-build" GOENV="/Users/artooro/Library/Application Support/go/env" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="darwin" GOINSECURE="" GONOPROXY="" GONOSUMDB="" GOOS="darwin" GOPATH="/Users/artooro/go" GOPRIVATE="" GOPROXY="https://proxy.golang.org,direct" GOROOT="/usr/local/go" GOSUMDB="sum.golang.org" GOTMPDIR="" GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64" GCCGO="gccgo" AR="ar" CC="clang" CXX="clang++" CGO_ENABLED="1" GOMOD="" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" PKG_CONFIG="pkg-config" GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/9z/jlqzn0wj4g12dg0ykj78dyph0000gn/T/go-build674964893=/tmp/go-build -gno-record-gcc-switches -fno-common"

</pre></details>

What did you do?

This can be reproduced by a very basic program, for example:

package main

import "fmt"

func main() {
	fmt.Println("Hello world")
}

Compile with the following environment variables.

GOOS=freebsd
GOARCH=arm64

Tried to run it on a Marvell Armada 3720LP (88F3720) dual core ARM Cortex A53.

What did you expect to see?

For the program to print "Hello World"

What did you see instead?

I get the following output: Illegal instruction (core dumped)

Here is the core dump file of that test program. testfreebsdarm64.core.zip

golang/go

Answer questions ianlancetaylor

Thanks. Please use x/i $pc to see the exact instruction.

useful!

Related questions

cmd/link: segmentation fault during mach-o linking
cmd/go: cannot find module providing package error stops `go get` processing hot 3
vendor/golang.org/x/xerrors/adaptor_go1_13.go:16:14: undefined: errors.Frame ... hot 2
cmd/vet: potential false positive in the "suspect or" check hot 2
cmd/go: needs a better error than "missing dot in first path element" when GOROOT is set incorrectly hot 2
x/xerrors: fails to compile on tip hot 1
cmd/go: `go clean <package>` downloads modules hot 1
cmd/cgo error: runtime: unknown pc 0x7fff5c805b86 hot 1
runtime: crash with "invalid pc-encoded table" hot 1
cmd/link: showing many ld warnings of "building for macOS, but linking in object file" hot 1
runtime: go program crach, it seems fall into infinite loop hot 1
cmd/go: major version without preceding tag must be v0, not v1 - breaks build of github.com/go-check hot 1
gollvm: Using External Go Packages with gollvm hot 1
runtime: macOS Sierra builders spinning hot 1
cmd/go: Problem using go modules hot 1
Github User Rank List