[Bug 225105] Linux static golang binaries crash at startup
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Sat Jan 13 14:02:37 UTC 2018
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=225105
--- Comment #5 from Edward Tomasz Napierala <trasz at FreeBSD.org> ---
The first chunks (passing pointers to pointers) breaks the dynamically linked
binary:
% ./go
cannot set up thread-local storage: cannot set %fs base address for
thread-local storage; ktrace looks like this:
64990 go CALL linux_arch_prctl(0x1002,0x800ac31c0)
64990 go RET linux_arch_prctl -1 errno -14 Bad address
64990 go CALL writev(0x2,0x7fffffffc410,0x3)
64990 go GIO fd 2 wrote 89 bytes
"cannot set up thread-local storage: cannot set %fs base address for
thread-local storage
"
64990 go RET writev 89/0x59
64990 go CALL linux_exit_group(0x7f)
It also doesn't fix the statically linked binary, although it changes the way
it fails:
(gdb) run
Starting program: /usr/home/en322/aosp/prebuilts/go/linux-x86/bin/gofmt
Program received signal SIGSEGV, Segmentation fault.
runtime.settls () at prebuilts/go/linux-x86/src/runtime/sys_linux_amd64.s:524
524 prebuilts/go/linux-x86/src/runtime/sys_linux_amd64.s: No such file or
directory.
(gdb) where
#0 runtime.settls () at
prebuilts/go/linux-x86/src/runtime/sys_linux_amd64.s:524
#1 0x0000000000453694 in runtime.rt0_go () at
prebuilts/go/linux-x86/src/runtime/asm_amd64.s:145
#2 0x0000000000000000 in ?? ()
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list