runtime: segfaults in cross compiled binaries for solaris 11.3
#61.950 aperta il 11 ago 2023
Metriche repository
- Star
- (133.883 star)
- Metriche merge PR
- (Nessuna PR mergiata in 30 g)
Descrizione
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