compress/flate: hang (original) (raw)
The following program:
package main
import ( "bytes" "compress/flate" "encoding/hex" "io/ioutil" )
func main() { data, _ := hex.DecodeString("344c4a4e494d4b070000ff2e2eff2e2e2e2e2eff") _, err := ioutil.ReadAll(flate.NewReader(bytes.NewReader(data))) if _, ok := err.(flate.InternalError); ok { panic(err) } }
hangs at:
#0 compress/flate.(*decompressor).huffSym (f=0xc208070000, h=0xc208070030, ~r1=0, ~r2=...)
at /ssd/src/go10/src/compress/flate/inflate.go:645
#1 0x0000000000454a59 in compress/flate.(*decompressor).huffmanBlock (f=0xc208070000)
at /ssd/src/go10/src/compress/flate/inflate.go:406
#2 0x0000000000453f03 in compress/flate.(*decompressor).Read (f=0xc208070000, b= []uint8 = {...},
~r1=32768, ~r2=...) at /ssd/src/go10/src/compress/flate/inflate.go:286
#3 0x000000000044f7ec in bytes.(*Buffer).ReadFrom (b=0xc208046070, r=..., n=386662400, err=...)
at /ssd/src/go10/src/bytes/buffer.go:173
#4 0x0000000000457f0f in io/ioutil.readAll (r=..., capacity=512, b= []uint8, err=...)
at /ssd/src/go10/src/io/ioutil/ioutil.go:33
#5 0x0000000000458028 in io/ioutil.ReadAll (r=..., ~r1= []uint8, ~r2=...)
at /ssd/src/go10/src/io/ioutil/ioutil.go:42
#6 0x0000000000400f42 in main.main () at /tmp/flate.go:12
I am on commit a02d925