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
$ go version
go version devel +add507d4646f Tue Oct 08 13:13:40 2013 -0700 linux/amd64
What steps will reproduce the problem?
If possible, include a link to a program on play.golang.org.
1. Download will_crash.gz data file
2. Either download go_gunzip.go or take the program from
http://play.golang.org/p/lLS8o9c-RO
3. Run it
go go_gunzip.go < will_crash.gz
What is the expected output?
Before io.Copy
After io.Copy
<exit status 0>
What do you see instead?
$ go run go_gunzip.go < will_crash.gz
2013/10/08 21:34:26 Before io.Copy
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x290 pc=0x424a53]
goroutine 1 [running]:
runtime.panic(0x4b3c60, 0x5b3328)
/home/krasin/go/src/pkg/runtime/panic.c:266 +0xb6
compress/gzip.(*Reader).Read(0x0, 0xc210050000, 0x2000, 0x2000, 0x2005b6e58, ...)
/home/krasin/go/src/pkg/compress/gzip/gunzip.go:200 +0x43
io/ioutil.devNull.ReadFrom(0x0, 0x7fd38de52180, 0x0, 0x0, 0x0, ...)
/home/krasin/go/src/pkg/io/ioutil/ioutil.go:144 +0xb0
io.Copy(0x7fd38de51190, 0x0, 0x7fd38de52180, 0x0, 0x0, ...)
/home/krasin/go/src/pkg/io/io.go:348 +0x124
main.main()
/home/krasin/testdata/go_gunzip.go:20 +0x243
exit status 2
Which compiler are you using (5g, 6g, 8g, gccgo)?
6g
Which operating system are you using?
Ubuntu Linux 12.04 x86-64 (also tested on 13.04).
Which version are you using? (run 'go version')
$ go version
go version devel +add507d4646f Tue Oct 08 13:13:40 2013 -0700 linux/amd64
Please provide any additional information below.
Attachments:
The text was updated successfully, but these errors were encountered: