[Docker-maint] Bug#756416: archive/tar is broken with respect to PAX headers

Tianon Gravi admwiggin at gmail.com
Tue Jul 29 16:36:31 UTC 2014


Package: src:golang
Severity: important

>From upstream[1]:
> "archive/tar: reuse temporary buffer in writeHeader" introduced a
> change which was supposed to help lower the number of allocations from
> 512 bytes for every call to writeHeader. This change broke the writing
> of PAX headers.
> 
> writeHeader calls writePAXHeader and writePAXHeader calls writeHeader
> again. writeHeader will end up writing the PAX header twice.
> 
> ...
> 
> This commit adds a dedicated buffer for pax headers to the Writer
> struct. This change increases the size of the struct by 512 bytes, but
> allows tar/writer to avoid allocating 512 bytes for all written
> headers and it avoids allocating 512 more bytes for pax headers.

I've attached a patch for the package to include this to complement our
previous patches. :)

♥,
- Tianon

[1]: https://code.google.com/p/go/source/detail?r=1b17b3426e3c281a973d2d7bbf235b936d6a0942
-------------- next part --------------
A non-text attachment was scrubbed...
Name: backport-archive-tar-patch-to-fix-PAX-headers.patch
Type: text/x-diff
Size: 3769 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/docker-maint/attachments/20140729/bfb18d98/attachment.patch>


More information about the Docker-maint mailing list