-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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
cgo panic in main·*Prog·loadDebugInfo #21
Labels
Comments
I don't have the same error but the same test segfaults on me on AMD64: --- cd ../misc/cgo/stdio rm -rf *.[568vqo] *.a [568vq].out *.cgo[12].go *.cgo[34].c *.so _obj _test _testmain.go hello fib chain run.out cgo file.go 6g -o _go_.6 file.cgo1.go file.cgo2.go 6c -FVw -I/redacted/src/pkg/runtime -D_64BIT file.cgo3.c make: *** [file.cgo3.6] Segmentation fault make: *** Deleting file `file.cgo3.6' $ uname -a Linux heta 2.6.20.5_rsp_3.9 #1 SMP Wed Oct 14 16:24:34 EST 2009 x86_64 x86_64 x86_64 GNU/Linux $ gcc --version gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-44) Copyright (C) 2006 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $ cat /etc/redhat-release CentOS release 5.3 (Final) |
Issue #43 has been merged into this issue. |
@1: Attached generated _cgo_.o. Attachments:
|
@rsc: I've discovered something strange about this bug: it doesn't occur when my $LANG is en_US.UTF-8. The default $LANG on my system is ru_RU.UTF-8. When I run all.bash with this setting, I always get the following output. ---------------- --- cd ../misc/cgo/stdio rm -rf *.[568vqo] *.a [568vq].out *.cgo[12].go *.cgo[34].c *.so _obj _test _testmain.go hello fib chain run.out cgo file.go could not determine kind of name for C.CString could not determine kind of name for C.puts could not determine kind of name for C.fflushstdout could not determine kind of name for C.free failed to interpret gcc output: cc1: warnings being treated as errors cgo-test: В функции ‘f’: (In the function 'f') cgo-test:0: ошибка: оператор без побочного эффекта (operator without side effect) cgo-test:1: ошибка: оператор без побочного эффекта cgo-test:2: ошибка: оператор без побочного эффекта cgo-test:3: ошибка: оператор без побочного эффекта make: *** [file.cgo1.go] Ошибка 2 (Error 2) ---------------- However, when I set $LANG to en_US.UTF-8 and then run all.bash, I get the following (correct) output, and all tests pass: ---------------- --- cd ../misc/cgo/stdio rm -rf *.[568vqo] *.a [568vq].out *.cgo[12].go *.cgo[34].c *.so _obj _test _testmain.go hello fib chain run.out cgo file.go 6g -o _go_.6 file.cgo1.go file.cgo2.go 6c -FVw -I/home/sean/dev/go/src/pkg/runtime -D_64BIT file.cgo3.c rm -f _obj/stdio.a gopack grc _obj/stdio.a _go_.6 file.cgo3.6 cp _obj/stdio.a /home/sean/dev/go/pkg/linux_amd64/stdio.a gcc -m64 -fPIC -O2 -o file.cgo4.o -c file.cgo4.c gcc -m64 -shared -lpthread -lm -o stdio_file.so file.cgo4.o cp stdio_file.so /home/sean/dev/go/pkg/linux_amd64/./stdio_file.so 6g hello.go 6l -o hello hello.6 6g fib.go 6l -o fib fib.6 6g chain.go 6l -o chain chain.6 rm stdio_file.so file.cgo4.o rm -rf *.[568vqo] *.a [568vq].out *.cgo[12].go *.cgo[34].c *.so _obj _test _testmain.go hello fib chain run.out ---------------- I have changed between the languages many times -- en_US.UTF-8 always succeeds, while ru_RU.UTF-8 always fails. Hopefully this bit of information should help. |
Comment 15 by nicolas.b.pierron: Here is a small patch which fix this issue. Attachments:
|
Owner changed to [email protected]. Status changed to Started. |
Issue #1 has been merged into this issue. |
Issue #169 has been merged into this issue. |
This issue was closed by revision 0238fd8. Status changed to Fixed. Merged into issue #-. |
Issue #246 has been merged into this issue. |
This was referenced Dec 8, 2014
Closed
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
by Sean.Stangl:
The text was updated successfully, but these errors were encountered: