I have done the following
Steps to reproduce
Should be observable using a build context with a large number of files.
Problem description
container build uses the Archiver type to create an archive of the build context to transfer to the builder VM.
The _compressFile function in Archiver writes a single member entry and its data to the archive. To this end it uses a 1 megabyte buffer, and an input stream. The implementation has several bugs though:
- Most seriously, it does not deallocate the buffer on exit from the function.
- The stream is not closed on a throwing error
- If an error occurs on a
read from the stream (negative return value for error in contrast with zero for end of stream), the function silently exits instead of reporting an error.
Environment
- OS: 26
- Xcode: 26
- Container: main
Code of Conduct
I have done the following
Steps to reproduce
Should be observable using a build context with a large number of files.
Problem description
container builduses the Archiver type to create an archive of the build context to transfer to the builder VM.The
_compressFilefunction in Archiver writes a single member entry and its data to the archive. To this end it uses a 1 megabyte buffer, and an input stream. The implementation has several bugs though:readfrom the stream (negative return value for error in contrast with zero for end of stream), the function silently exits instead of reporting an error.Environment
Code of Conduct