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
What steps will reproduce the problem?
If possible, include a link to a program on play.golang.org.
1. Compile the attached c code as a dll
2. Compile the attached go code using the dll produced during previous step
3. Run the generated executable
(see build.bat in the attached zip file)
//The code sample is the same as in issue #5273, corrected to link with dll.
What is the expected output?
[DLL] Hello from go
What do you see instead?
fatal error: malloc/free - deadlock
[signal 0xc0000005 code=0x1 addr=0x2f0 pc=0x414bf8]
goroutine 1 [syscall]:
[fp=0x25177c] return()
C:/go/src/pkg/runtime/asm_386.s:472
[fp=0x2517a4] runtime.cgocall(0x41e053, 0x2517b0)
C:/go/src/pkg/runtime/cgocall.c:162 +0x10a
[fp=0x2517b0] main._Cfunc_Echo(0x572fb8)
C:/Users/SIMONH~1/AppData/Local/Temp/go-build942746867/_/E_/GoIssue/GoEc
ho/_obj/_cgo_defun.c:44 +0x31
[fp=0x2517c4] main.main()
C:/Users/SIMONH~1/AppData/Local/Temp/go-build942746867/_/E_/GoIssue/GoEc
ho/_obj/main.cgo1.go:19 +0x55
[fp=0x2517dc] runtime.main()
C:/go/src/pkg/runtime/proc.c:182 +0x8e
[fp=0x2517e0] runtime.goexit()
C:/go/src/pkg/runtime/proc.c:1223
goroutine 2 [syscall]:
Which compiler are you using (5g, 6g, 8g, gccgo)?
8g
Which operating system are you using?
Windows 7/x86
Which version are you using? (run 'go version')
go version go1.1 windows/386
(compiled from source with gcc 4.6.2)
Please provide any additional information below.
I came up to this issue with a more complex library which works fine on linux x64 (.so
library). It seems to be windows related only.
I've also tried with the curent tip version and the issue is the same.
simonhege,
It looks to me, your issue is not broken any more. Since
https://code.google.com/p/go/source/detail?r=75123d9d5b96
commit. I am no good with cgo and gcc, and I don't have time to investigate it further,
but if you are OK I will close it.
Alex
Attachments:
The text was updated successfully, but these errors were encountered: