golang/go

runtime: segfaults in cross compiled binaries for solaris 11.3

Open

#61,950 opened on Aug 11, 2023

View on GitHub
 (8 comments) (0 reactions) (0 assignees)Go (19,008 forks)batch import
NeedsInvestigationOS-Solariscompiler/runtimehelp wanted

Repository metrics

Stars
 (133,883 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

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)?

linux centos 8

What did you do?

func main() { fmt.Println("Abcd") }

env GOOS=solaris GOARCH=amd64 CGO_ENABLED=0 go build -o test-sol-1.21.0

What did you expect to see?

Abcd

What did you see instead?

Segmentation Fault (core dumped)

sotruss ~/test-sol-1.21.0 test-sol-1.21.0 -> libc.so:*sysconf(0xf, 0xffff80ffbffff6a0, 0x42ce0f) test-sol-1.21.0 -> libc.so:*mmap(0x0, 0x40000, 0x3) test-sol-1.21.0 -> libc.so:*mmap(0x0, 0x20000, 0x0) test-sol-1.21.0 -> libc.so:*mmap(0x0, 0x100000, 0x0) test-sol-1.21.0 -> libc.so:*mmap(0x0, 0x800000, 0x0) test-sol-1.21.0 -> libc.so:*mmap(0x0, 0x4000000, 0x0) test-sol-1.21.0 -> libc.so:*mmap(0x0, 0x20000000, 0x0) test-sol-1.21.0 -> libc.so:*mmap(0x0, 0x20000000, 0x0) test-sol-1.21.0 -> libc.so:*mmap(0xc000000000, 0x4000000, 0x0) test-sol-1.21.0 -> libc.so:*mmap(0x0, 0x2000000, 0x3) test-sol-1.21.0 -> libc.so:*mmap(0x0, 0x114c10, 0x3) test-sol-1.21.0 -> libc.so:*mmap(0xc000000000, 0x400000, 0x3) test-sol-1.21.0 -> libc.so:*mmap(0xffff80ffbf625000, 0x20000, 0x3) test-sol-1.21.0 -> libc.so:*mmap(0xffff80ffbe97f000, 0x1000, 0x3) test-sol-1.21.0 -> libc.so:*mmap(0xffff80ffbde06000, 0x1000, 0x3) test-sol-1.21.0 -> libc.so:*mmap(0xffff80ffbb830000, 0x1000, 0x3) test-sol-1.21.0 -> libc.so:*mmap(0xffff80ffa9780000, 0x1000, 0x3) test-sol-1.21.0 -> libc.so:*mmap(0xffff80ff89580000, 0x1000, 0x3) test-sol-1.21.0 -> libc.so:*mmap(0x0, 0x100000, 0x3) test-sol-1.21.0 -> libc.so:*mmap(0x0, 0x10000, 0x3) test-sol-1.21.0 -> libc.so:*mmap(0x0, 0x10000, 0x3) test-sol-1.21.0 -> libc.so:*open(0x52d4b0, 0x0, 0x0) /usr/bin/sotruss: line 78: 277: Memory fault(coredump)

ldd ~/test-sol-1.21.0 libsendfile.so => /lib/64/libsendfile.so libsocket.so => /lib/64/libsocket.so libc.so => /lib/64/libc.so libnsl.so.1 => /lib/64/libnsl.so.1 libmp.so.2 => /lib/64/libmp.so.2 libucrypto.so.1 => /lib/64/libucrypto.so.1 libelf.so.1 => /lib/64/libelf.so.1 libcryptoutil.so.1 => /lib/64/libcryptoutil.so.1 libz.so.1 => /lib/64/libz.so.1

Contributor guide