42 lines
2.1 KiB
Text
42 lines
2.1 KiB
Text
# libFuzzer dictionary for roundtrip_arbitrary.
|
||
#
|
||
# roundtrip_arbitrary reads little-endian i32 chunks as PCM samples.
|
||
# The interesting values are the boundary magnitudes the codec has
|
||
# explicit handling for: zero, ±1 (sign-flip test), the 8/16/20/24-bit
|
||
# ceilings, and the full 24-bit contract limits. Seeding these as
|
||
# 4-byte LE words lets libFuzzer splice them directly into sample
|
||
# positions without having to discover the bit patterns by luck.
|
||
#
|
||
# Pass via:
|
||
#
|
||
# cargo +nightly fuzz run roundtrip_arbitrary -- -dict=dict/roundtrip_arbitrary.dict
|
||
|
||
# ─── Zero and unit samples ──────────────────────────────────────────
|
||
sample_zero="\x00\x00\x00\x00"
|
||
sample_pos_one="\x01\x00\x00\x00"
|
||
sample_neg_one="\xff\xff\xff\xff"
|
||
|
||
# ─── 8-bit PCM ceilings ──────────────────────────────────────────────
|
||
sample_pos_127="\x7f\x00\x00\x00"
|
||
sample_neg_128="\x80\xff\xff\xff"
|
||
|
||
# ─── 16-bit PCM ceilings ─────────────────────────────────────────────
|
||
sample_pos_32767="\xff\x7f\x00\x00"
|
||
sample_neg_32768="\x00\x80\xff\xff"
|
||
|
||
# ─── 20-bit ceilings (studio-mastered material) ──────────────────────
|
||
sample_pos_524287="\xff\xff\x07\x00"
|
||
sample_neg_524288="\x00\x00\xf8\xff"
|
||
|
||
# ─── 24-bit ceilings — LAC's contract limit ─────────────────────────
|
||
# |sample| ≤ 2^23 − 1. Values at exactly +8388607 and −8388607 exercise
|
||
# the autocorrelation accumulator's worst case.
|
||
sample_pos_8388607="\xff\xff\x7f\x00"
|
||
sample_neg_8388607="\x01\x00\x80\xff"
|
||
|
||
# ─── Out-of-contract values (clamped by the fuzz target) ─────────────
|
||
# Included so libFuzzer has the bit patterns handy if the encoder's
|
||
# magnitude guard ever regresses; the clamp in the harness keeps these
|
||
# from reaching encode_frame in steady state.
|
||
sample_i32_max="\xff\xff\xff\x7f"
|
||
sample_i32_min="\x00\x00\x00\x80"
|