datafusion-contrib / datafusion-contrib/liquid-cache

Fuzz testing de/serialization

Open
#122 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

good first issue help wanted
Dominant language
Rust
Stars
452
Forks
51
Avg merge
3h 10m
Merged PRs (30d)
12

Description

Our de/serialization has many non-trivial code like below. It's better for us to be extremely cautious about the implementation, and fuzz test it or find some kind of formal verification to make sure the code is doing correctly.

  /*
    Serialized LiquidPrimitiveArray Memory Layout:

    +--------------------------------------------------+
    | LiquidPrimitiveArray Header (16 bytes)           |
    +--------------------------------------------------+
    | MAGIC (4 bytes)                                  |  // Offset  0..3: "LQDA" magic number (0x4C51_4441)
    +--------------------------------------------------+
    | VERSION (2 bytes)                                |  // Offset  4..5: Version (currently 1)
    +--------------------------------------------------+
    | type_id (2 bytes)                                |  // Offset  6..7: Type identifier for T
    +--------------------------------------------------+
    | reference_value (size_of::<T::Native> bytes)     |  // Offset  8..(8 + size_of::<T::Native> - 1):
    |                                                  |  // the reference value (e.g. minimum value)
    +--------------------------------------------------+
    | Padding (to 16 bytes)                            |  // Padding to ensure 16 byte
    +--------------------------------------------------+

    +--------------------------------------------------+
    | BitPackedArray Data                              |
    +--------------------------------------------------+
    | [BitPackedArray Header & Bit-Packed Values]      |  // Written by self.bit_packed.to_bytes()
    +--------------------------------------------------+
    */

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the de/serialization entry points for LiquidPrimitiveArray and the BitPackedArray bytes produced by self.bit_packed.to_bytes(). Review the documented memory layout and identify malformed-input and version/type cases for fuzzing. Done means fuzz coverage or formal verification is established for these paths and failures are reproducible.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
testing
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.