Skip to content

Fix large library project loading crash - #799

Merged
YukiMatsuzawa merged 2 commits into
masterfrom
copilot/yukimatsuzawa-fix-large-library-lz4-decoder
Sep 17, 2026
Merged

YukiMatsuzawa merged 2 commits into
masterfrom
copilot/yukimatsuzawa-fix-large-library-lz4-decoder

Conversation

@YukiMatsuzawa

Copy link
Copy Markdown
Contributor

Summary

  • Read stream data until the requested buffer is filled before LZ4 decoding.
  • Add regression coverage for short reads across regular, incremental, and indexed deserialization.

Fixes #796

Validation

  • dotnet test tests\Common\CommonStandardTests\CommonStandardTests.csproj --filter FullyQualifiedName~LargeListMessagePackTests --no-restore
  • 10 tests passed

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

FillFromStream can still report success for incomplete reads, allowing truncated data to reach parsing or LZ4 decoding.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Fixes large-library loading crashes by handling short stream reads before LZ4 deserialization.

Changes:

  • Fills buffers across partial stream reads.
  • Adds regression coverage for regular, incremental, and indexed deserialization.
File summaries
File Description
tests/Common/CommonStandardTests/MessagePack/LargeListMessagePackTests.cs Adds short-read regression tests.
src/Common/CommonStandard/MessagePack/LargeListMessagePack.cs Updates stream buffer filling.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +144 to +147
if (length <= 0)
{
return false;
}
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@YukiMatsuzawa
YukiMatsuzawa merged commit bb608b7 into master Sep 17, 2026
1 check passed
@YukiMatsuzawa
YukiMatsuzawa deleted the copilot/yukimatsuzawa-fix-large-library-lz4-decoder branch September 17, 2026 05:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Opening a project with a large library crashes: short read feeds the unsafe LZ4 decoder in LargeListMessagePack

2 participants