Wave icon indicating copy to clipboard operation
Wave copied to clipboard

Accept valid multi-member gzip streams during tar extraction

Open LunaStev opened this issue 3 weeks ago • 0 comments

Problem

The gzip reader handles only one member. A valid gzip stream split into multiple members is reported as a truncated archive when the TAR entry crosses that boundary.

Reproduction and evidence

Audited canonical master 69a67c6e0fb700f37ee6114f5a66d37ee13771a5 (0.0.1-alpha-dev). Matching checkout-built compiler/std were used for compiler probes on Linux amd64 with Rust 1.89.0 and LLVM 21.1.8. Artifact inspection, mocked/projection checks and foreign-target object emission are identified below and are not native execution on those operating systems.

Create an in-memory TAR containing llvm/file. Write gzip.compress(tar_bytes[:512]) + gzip.compress(tar_bytes[512:]) as fixture.tar.gz. gzip.decompress returns the complete original TAR. The actual sdk extract CLI fails with truncated archive entry; the equivalent single-member archive succeeds.

Scope

Read successive gzip members as one decompressed archive stream, including end/trailer validation.

Starting points: tools/src/sdk.rs:311.

Completion criteria

  • [ ] A valid member boundary through a TAR payload extracts correctly.
  • [ ] Single-member archives still work.
  • [ ] Corrupt/truncated later members fail without activating a partial tree.

This is a bounded newcomer task with the starting point and focused negative/positive checks above.

Related: #1070. Related broad trackers or completed implementations are context, not claims that their entire scope is unfinished.

LunaStev avatar Nov 12 '26 12:11 LunaStev