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

Aperta Adatta ai principianti
#5,128 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
1/5
Tempo stimato
Meno di un'ora
Idoneità per principianti
92/100
Tipo di issue
Documentazione
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
c
Ambito
documentation

Direzione di ricerca

Apri doc/decompressor_errata.md e leggi la voce “Compressed block with 0 literals and 0 sequences” intorno alla riga 65. Sostituisci il frame di esempio non valido con 28b5 2ffd 0000 1500 0000 00, come suggerito nell’issue. Il lavoro è completato quando il frame documentato corrisponde all’esempio corretto di #3482.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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`
Lingua principale
C
Stelle
28.1k
Fork
2.7k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di facebook/zstd

Tutte le issue di facebook/zstd

Issue simili

Altre issue su C

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.