-
Notifications
You must be signed in to change notification settings - Fork 17.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmd/cgo: trivial program fails on windows/386 with 4.3.3-tdm-1 mingw32 #17679
Comments
The code is:
It does seem like that should work. The exit code is 0xc0000005, access violation (like Unix SIGSEGV). @WesleiRamos, what versions of Windows are you using? Thanks. |
This works for me on:
with both Alex |
@rsc Windows 10 |
Is there a reason you are using 32-bit x86 with Windows 10 instead of 64-bit x86? I wouldn't think Windows 10 would run on any 32-bit-only hardware. I wonder if maybe something somewhere is getting confused about whether it should be 32-bit or 64-bit code. |
I switched compiler and it worked, to version 4.7.1 of gcc. |
Sounds like this is resolved. Let me know if I'm confused. |
What version of Go are you using (
go version
)?1.7
What operating system and processor architecture are you using (
go env
)?set GOARCH=386
set GOBIN=
set GOEXE=.exe
set GOHOSTARCH=386
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=C:\Users\Dayhane & Lucas\Go
set GORACE=
set GOROOT=C:\Go
set GOTOOLDIR=C:\Go\pkg\tool\windows_386
set CC=gcc
set GOGCCFLAGS=-m32 -mthreads -fmessage-length=0 -fdebug-prefix-map=C:\Users\DAYHAN~1\AppData\Local\Temp\go-build422804030=/tmp/go-build
set CXX=g++
set CGO_ENABLED=1
C compiler
Reading specs from c:/mingw/bin/../lib/gcc/mingw32/4.3.3/specs
Target: mingw32
Configured with: ../gcc-4.3.3/configure --prefix=/mingw --build=mingw32 --enable-languages=c,ada,c++,fortran,objc,obj-c++ --with-bugurl=http://www.tdragon.net/recentgcc/bugs.php --disable-nls --disable-win32-registry --enable-libgomp --disable-werror --enable-threads --disable-symvers --enable-cxx-flags='-fno-function-sections -fno-data-sections' --enable-fully-dynamic-string --enable-version-specific-runtime-libs --enable-sjlj-exceptions --with-pkgversion='4.3.3-tdm-1 mingw32'
Thread model: win32
gcc version 4.3.3 (4.3.3-tdm-1 mingw32)
Error
My code build but not runs, returns this error 'exit status -1073741819'
In ideone works http://ideone.com/yvW02W
(sorry my english)
The text was updated successfully, but these errors were encountered: