You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Building the attached code from the Stack Overflow question http://goo.gl/QTpdHS fully
statically (-static), results in the following panic:
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x0]
goroutine 2 [syscall]:
goroutine 1 [runnable]:
Building it semi-statically (-static-libgo) works fine, though.
The crash looks like this in gdb:
Program received signal SIGSEGV, Segmentation fault.
0x0000000000000000 in ?? ()
(gdb) bt
#0 0x0000000000000000 in ?? ()
#1 0x00000000004adf67 in __wrap_pthread_create ()
#2 0x000000000040657e in runtime_newm ()
#3 0x000000000040665b in matchmg ()
#4 0x0000000000406f15 in syscall.Entersyscall ()
#5 0x0000000000403e5c in runtime_MHeap_Scavenger ()
#6 0x0000000000406e15 in kickoff ()
#7 0x00000000004ba910 in ?? ()
#8 0x0000000000000000 in ?? ()
I can confirm that the bug happens in 4.7, but it does not happen in the current 4.8
sources. I believe it was fixed by
http://gcc.gnu.org/viewcvs/gcc?view=revision&revision=195244 .
It will work with 4.7 if you link with -Wl,-u,pthread_create .
Attachments:
The text was updated successfully, but these errors were encountered: