Skip to content
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

gccgo, cgo: iconv package doesn't work #3332

Closed
alberts opened this issue Mar 16, 2012 · 4 comments
Closed

gccgo, cgo: iconv package doesn't work #3332

alberts opened this issue Mar 16, 2012 · 4 comments
Milestone

Comments

@alberts
Copy link
Contributor

alberts commented Mar 16, 2012

What steps will reproduce the problem?

GOPATH=`pwd` go test -compiler=gccgo -v iconv

What is the expected output?

GOPATH=`pwd` go test -v iconv

=== RUN TestIconv
--- PASS: TestIconv (0.00 seconds)
=== RUN TestIconvReverse
--- PASS: TestIconvReverse (0.00 seconds)
=== RUN TestError
--- PASS: TestError (0.00 seconds)
=== RUN TestConvertToUTF8
--- PASS: TestConvertToUTF8 (0.00 seconds)
=== RUN TestConvertBytesToUTF8
--- PASS: TestConvertBytesToUTF8 (0.00 seconds)
=== RUN TestBytes2
--- PASS: TestBytes2 (0.00 seconds)
=== RUN TestHang
--- PASS: TestHang (0.00 seconds)
=== RUN TestLong
--- PASS: TestLong (0.00 seconds)
PASS
ok      iconv   0.010s

What do you see instead?

GOPATH=`pwd` go test -compiler=gccgo -v iconv

=== RUN TestIconv-16
--- FAIL: TestIconv-16 (0.01 seconds)
        :0: Error on opening: Success
=== RUN TestIconvReverse-16
--- FAIL: TestIconvReverse-16 (0.00 seconds)
        :0: Error on opening: Success
=== RUN TestError-16
--- PASS: TestError-16 (0.00 seconds)
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
        panic: runtime error: invalid memory address or nil pointer dereference
exit status 2
FAIL    iconv   0.031s

Which compiler are you using (5g, 6g, 8g, gccgo)?

gccgo

Which operating system are you using?

linux amd64

Which revision are you using?  (hg identify)

go version weekly.2012-03-13 +a303acb0a5f2

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@185451
138bc75d-0d04-0410-961f-82ee72b054a4

Please provide any additional information below.

There seems to be a bug with returning the value of errno and another bug causing a
segfault.

Attachments:

  1. iconv.go (2377 bytes)
  2. iconv_test.go (3525 bytes)
  3. main.go (595 bytes)
@alberts
Copy link
Contributor Author

alberts commented Mar 16, 2012

Comment 1:

typo: ... causing a nil pointer dereference.

@dsymonds
Copy link
Contributor

Comment 2:

Labels changed: added priority-go1, gccgo, cgo, removed priority-triage.

Owner changed to @ianlancetaylor.

@ianlancetaylor
Copy link
Contributor

Comment 3:

http://golang.org/cl/5868047

@ianlancetaylor
Copy link
Contributor

Comment 4:

This issue was closed by revision 3a3c5aa.

Status changed to Fixed.

@rsc rsc added this to the Go1 milestone Apr 10, 2015
@rsc rsc removed the priority-go1 label Apr 10, 2015
@golang golang locked and limited conversation to collaborators Jun 24, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants