????2012??3??9???????
?????????????????? cgo ???? gtk ???????????? segment fault????????????
package main
/*
#include <gtk/gtk.h>
#cgo pkg-config: gtk+-3.0
*/
import "C"
func main() {
C.gtk_init(nil?? nil)
C.gtk_file_chooser_button_new(nil?? 0)
}
???????????? C ?汾???????
#include <gtk/gtk.h>
int main(int argc?? char **argv)
{
gtk_init(0?? 0);
gtk_file_chooser_button_new(0?? 0);
}
????????????????????????rsc??Russ Cox??Go ???????????????????????????????? cgo ????? C ???????????????????Щ??????? Go ??????????????? Go ???????????????????? Go ??????ú?????
????2012??3??13?????????????
????rsc ??????????? fix????????? bug ?????????? Go ??????????????????????????????? Go 1.0 ????? fix ?? bug???????? bug ???????
????2013??6??13??????????????
????15???o??λ???? joshrickmar ??????????????????????? cgo ???? gtk???????????????
?????????? rsc ????????????????????????????3??????????????????????? ?????? OpenBSD ???? fix??????????????????????3??????????????
????2013??7??12??????????
????minux??Go ??????????????????? joshrickmar ???????????????? Go ????? Go ???????os/signal.Notify????????????????????????????????????????????????????????? bug ??????????
????????
????????????????????? cgo ???? C ???????3????????????????????????????????????????????????? Go ????????е??????? bug??????д????棬????????£???????????? segment fault ??????????????? SIGSEGV ?????????????????????? crash?????? SIGSEGV ?????????????????????? bug ???????Σ???????????????????????????????????????????????λ????鷳??
????2015??7??22????????
????2???ianlancetaylor??Go ?????????????????? bug??????????????????????? Go ????? Go ????????????????????????????黹???????
???????????????????? bug??
????Timeline
????2012??3??09?? ????
????2012??3??13?? ??????????
????2012??3??28?? Go 1.0 ????
????2013??5??13?? Go 1.1 ????
????2013??6??13?? ???????????
????2013??7??12?? ???????
????2013??12??01?? Go 1.2 ????
????2014??06??18?? Go 1.3 ????
????2014??12??10?? Go 1.4 ????
????2015??7??22?? ?????
????2015??8??19?? Go 1.5 ????
????2016??2??17?? Go 1.6 ????
????2016??8??15?? Go 1.7 ????
???????????
??????д???????????????????? bug ???? Go ?汾?е???????????? Go 1.4 ?? 1.7 ?????汾?????????£?
????1?????? Go thread ?д????? segfault??????????汾?????3??? crash??
????2?????? C thread ?д????? segfault
????· ?? 1.4 ?У?segfault ?????????????????????????????????????
????· ?? 1.7 ?У?segfault ??????? crash
???????????????????????????汾 Go ?е????????????? Go ??????е??????????????????????????????? C ????????????????????????????ɡ?