windows/386 problems:
This is the end of the build:
...
# ..\misc\cgo\stdio
# ..\misc\cgo\test
# _/C_/go/root/misc/cgo/test
..\misc\cgo\test\cthread_windows.c: In function 'addThread':
..\misc\cgo\test\cthread_windows.c:18:2: warning: 'return' with a value,
in function returning void
..\misc\cgo\test\cthread_windows.c: In function 'doAdd':
..\misc\cgo\test\cthread_windows.c:31:3: warning: passing argument 3 of
'_beginthreadex' from incompatible pointer type
c:\go\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../include/process.h:100:2:
note: expected 'unsigned int (*)(void *)' but argument is of type 'void
(*)(void *)'
ok _/C_/go/root/misc/cgo/test 19.469s
# ..\doc\progs
# ..\test
# Checking API compatibility.
+pkg go/types, method (*Const) GetPkg() *Package
+pkg go/types, method (*Func) GetPkg() *Package
+pkg go/types, method (*Package) GetPkg() *Package
+pkg go/types, method (*TypeName) GetPkg() *Package
+pkg go/types, method (*Var) GetPkg() *Package
+pkg go/types, type Const struct, Pkg *Package
+pkg go/types, type Func struct, Pkg *Package
+pkg go/types, type Object interface, GetPkg() *Package
+pkg go/types, type TypeName struct, Pkg *Package
+pkg go/types, type Var struct, Pkg *Package
~pkg net, func ListenUnixgram(string, *UnixAddr) (*UDPConn, error)
~pkg text/template/parse, type DotNode bool
~pkg text/template/parse, type Node interface { Copy, String, Type }
±pkg go/types, type Importer func(imports map[string]*Package, path
string) (pkg
*Package, err error)
ALL TESTS PASSED
...
So, there are some compiler warnings. But misc\cgo\test test executable
also crashes. You don't get to see the crash, because, my "system
debugger" is started to handle the exception, and I had to take some
manual options to kill the bugger. I think it is because your new C
threads don't set any exception handler. Our builder won't be able to do
what I did, so we have to be careful.
I tried to poke at it:
C:\go\root\misc\cgo\test>gdb test.test.exe
GNU gdb (GDB) 7.2
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<
http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show
copying"
and "show warranty" for details.
This GDB was configured as "mingw32".
For bug reporting instructions, please see:
<
http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from C:\go\root\misc\cgo\test/test.test.exe...done.
(gdb) r
Starting program: C:\go\root\misc\cgo\test/test.test.exe
[New Thread 6492.0xe08]
[New Thread 6492.0x1da8]
[New Thread 6492.0x1eec]
scatter = 0042D268
hello from C
[New Thread 6492.0x178c]
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 6492.0x178c]
runtime.cgocallback (fn=void, frame=void, framesize=void)
at C:/go/root/src/pkg/runtime/asm_386.s:485
485 MOVL m(CX), BP
(gdb) bt
#0 runtime.cgocallback (fn=void, frame=void, framesize=void)
at C:/go/root/src/pkg/runtime/asm_386.s:485
#1 0x0042c500 in _cgoexp_e9125f37873d_Add (a=void, n=void)
at
C:/DOCUME~1/brainman/LOCALS~1/Temp/go-build214494323/_/C_/go/root/misc/cgo/test/_test/_cgo_defun.c:321
#2 0x004805f6 in ?? ()
#3 0x0042ca5b in ?? ()
#4 0x0042d3dc in ?? ()
#5 0x77c3a3b0 in msvcrt!_endthreadex () from
C:\WINDOWS\system32\msvcrt.dll
#6 0x7c80b729 in KERNEL32!GetModuleFileNameA ()
from C:\WINDOWS\system32\kernel32.dll
#7 0x00000000 in ?? ()
(gdb) info reg
eax 0x4 4
ecx 0x0 0
edx 0xad0608 11339272
ebx 0x0 0
esp 0x3152fefc 0x3152fefc
ebp 0x3152ff30 0x3152ff30
esi 0xa 10
edi 0x0 0
eip 0x41c4ca 0x41c4ca <runtime.cgocallback+10>
eflags 0x10216 [ PF AF IF RF ]
cs 0x1b 27
ss 0x23 35
ds 0x23 35
es 0x23 35
fs 0x3b 59
gs 0x0 0
But, I don't know what I am looking for.
The windows/amd64 didn't get very far either:
pkg/go/doc
pkg/go/build
cmd/go
lockextra: nosplit stack overflow
120 assumed on entry to lockextra
88 after lockextra uses 32
80 on entry to runtime.osyield
56 after runtime.osyield uses 24
48 on entry to runtime.stdcall
-16 after runtime.stdcall uses 64
go tool dist: FAILED: c:\MinGW64\go\pkg\tool\windows_amd64\6l -o
c:\MinGW64\go\pkg\tool\windows_amd64\go_bootstrap.exe
C:\Users\brainman\AppData\Local\Temp\goEC42.tmp\_go_.6
Alex
https://codereview.appspot.com/7304104/