-
Notifications
You must be signed in to change notification settings - Fork 18k
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
archive/tar: mention changes in go1.6 docs #13647
Comments
It looks like "bugs fixed in arcane corner cases", which usually doesn't go into release notes. The most visible change is spelling license correctly. Maybe e3b615f (detect truncated files) is worth mentioning, but maybe not.
|
I think in aggregate it's worth calling out, even if not each one. If people notice problems with tar files in Go 1.5 vs Go 1.6, it'd be nice to have something in the release notes saying suggesting "yeah, a bunch of work went on there, maybe we fixed something, maybe we introduced a new bug". |
IMHO, this is the most user visible change:
These changes allow tar Reader to detect certain bad files. Previously, it would possibly return junk (but no error), but now it actually errors with an error.
These changes harden the Reader against files that would be obviously wrong (maliciously crafted), so I don't anticipate it failing to parse legitimate tar files. Previously, the Reader would panic, spin forever, or allocate large amounts of memory.
These changes clean up and prepare the code for future changes (not worth mentioning). |
I realized it would be fitting to mention this behavioral change in the documentation of Reader.Read for header-only files. I sent out CL/17913. Also, I only fixed header-only issues on the Reader side since a bug was filed for it (b/25418768). But the Writer still allows users to generate invalid tar files (by putting data in a header-only "file"). I have a fix for it, but was planning to address it next cycle. Since the Reader and Writer are now asymmetrical in this regard, should I submit a CL for fixing header-only files for Writer for go1.6? |
CL https://golang.org/cl/17913 mentions this issue. |
Commit dd5e14a ensured that no data could be read for header-only files regardless of what the Header.Size said. We should document this fact in Reader.Read. Updates #13647 Change-Id: I4df9a2892bc66b49e0279693d08454bf696cfa31 Reviewed-on: https://go-review.googlesource.com/17913 Reviewed-by: Russ Cox <rsc@golang.org>
CL https://golang.org/cl/18642 mentions this issue. |
http://tip.golang.org/doc/go1.6 does not mention archive/tar at all, but tons of work went into in this cycle.
@dsnet, can you help summarize the notable parts?
The text was updated successfully, but these errors were encountered: