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?
1. Download http://play.golang.org/p/CnggE5bY6l as "test.go"
2. Download
http://distfiles.gentoo.org/releases/amd64/autobuilds/20131226/stage3-amd64-20131226.tar.bz2
(170 MB). Digests are in
http://distfiles.gentoo.org/releases/amd64/autobuilds/20131226/stage3-amd64-20131226.tar.bz2.DIGESTS.asc
(e.g., the SHA512 is
8b32da32800d710cef952beadbdaea2517cc4dabddd0ad774335a903370b83246034dc0d17949a31e69bddd0a851807bcfde0a5facd704ed0791bece0b4b12d8).
3. Run:
$ go run test.go < stage3-amd64-20131226.tar.bz2
What is the expected output?
Nothing.
What do you see instead?
bzip2 data invalid: superfluous level in Huffman tree
exit status 1
Which compiler are you using (5g, 6g, 8g, gccgo)?
Whatever 'go run' uses internally. I haven't installed any additional Go compilers (e.g. I haven't enabled GCC's Go compiler).
Which operating system are you using?
Gentoo, via dev-lang/go-1.2::gentoo
Which version are you using? (run 'go version')
go version go1.2 linux/amd64
Please provide any additional information below.
This spun off from moby/moby#3816, but the test above produces the error without involving any Docker code. I'm not sure which bzip implementation was used to generate the tarball, but if I recompress it with bzip2 v1.0.6, I don't see an error:
$ bzcat stage3-amd64-20131226.tar.bz2 | bzip2 | go run test.go
$ echo $?
0
The text was updated successfully, but these errors were encountered:
Adam, the Docker folks are being affected by this. Could you take a look and decide
whether it's something we should fix?
I imagine if the regular bzip tool handles it and we don't, we should match.
I'm pretty sure that this is an encoder bug however if it exists in the wild then it
would be nice to handle it. I've mailed https://golang.org/cl/64010043 for
review. Sadly handling this is subtle but it doesn't mess up the code too much.
I've confirmed that it can now process the buggy input referenced in #1 and produces the
same output as bzip2 from the command line.
by tvrkng:
The text was updated successfully, but these errors were encountered: