doc: update stale invalid example frame in doc/decompressor_errata.md (follow-up to #3482)

Đang mở Phù hợp với người mới
#5,128 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
1/5
Thời gian dự kiến
Dưới một giờ
Mức phù hợp với người mới
92/100
Loại issue
Tài liệu
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
c
Lĩnh vực
documentation

Hướng nghiên cứu

Mở doc/decompressor_errata.md và đọc mục “Compressed block with 0 literals and 0 sequences” quanh dòng 65. Thay frame ví dụ không hợp lệ bằng 28b5 2ffd 0000 1500 0000 00, như được đề xuất trong issue. Hoàn tất khi frame được ghi trong tài liệu khớp với ví dụ đã sửa trong #3482.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Describe the bug
Follow-up to #3482:

In #3482, tests/golden-decompression/empty-block.zst was fixed from:

  • 28b5 2ffd 2000 1500 0000 00 (Single_Segment_flag = 1, FCS = 0 -> Window_Size = 0 -> Block_Maximum_Size = 0, which is invalid per RFC 8878 because its 2-byte Compressed_Block violates Block_Size <= Block_Maximum_Size)

to:

  • 28b5 2ffd 0000 1500 0000 00 (Window_Descriptor = 0 -> Window_Size = 1024, valid frame).

However, doc/decompressor_errata.md:65 (under "Compressed block with 0 literals and 0 sequences") still lists the old invalid frame 28b5 2ffd 2000 1500 0000 00 as a valid example whose "Last affected version" is v1.5.2, even though v1.5.6, v1.6.0, and dev (539a64c423) all reject it.

(Note: The separate one-shot vs streaming error-code difference on that invalid frame — srcSize_wrong vs corruption_detected — is already being addressed by open PR #5102, which does not update doc/decompressor_errata.md.)

To Reproduce
Verified on dev 539a64c423:

xxd tests/golden-decompression/empty-block.zst
# 00000000: 28b5 2ffd 0000 1500 0000 00              (./........

sed -n '56,66p' doc/decompressor_errata.md
# Compressed block with 0 literals and 0 sequences
# ------------------------------------------------
# **Last affected version**: v1.5.2
# ...
# **Example Frame**: `28b5 2ffd 2000 1500 0000 00`

printf '\x28\xb5\x2f\xfd\x20\x00\x15\x00\x00\x00\x00' | zstd -d -c
# zstd: /*stdin*\: Decoding error (36) : Data corruption detected

Expected behavior
Update doc/decompressor_errata.md:65 from 28b5 2ffd 2000 1500 0000 00 to 28b5 2ffd 0000 1500 0000 00 (or link tests/golden-decompression/empty-block.zst) so it is a valid frame matching #3482.

Desktop (please complete the following information):

  • OS: Linux x86_64 (Ubuntu 22.04)
  • Version: dev 539a64c423 (v1.6.0+)
  • Compiler: gcc 11.4.0
  • Flags: -O2
  • Build system: Makefile

Additional context
Suggested diff:

--- a/doc/decompressor_errata.md
+++ b/doc/decompressor_errata.md
@@ -62,7 +62,7 @@
 
 **Produced by the reference compressor**: No
 
-**Example Frame**: `28b5 2ffd 2000 1500 0000 00`
+**Example Frame**: `28b5 2ffd 0000 1500 0000 00`
Ngôn ngữ chính
C
Star
28.1k
Fork
2.7k
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của facebook/zstd

Tất cả issue của facebook/zstd

Issue tương tự

Thêm issue về C

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.