Skip to content

test(fuzz): Lua encode/roundtrip property fuzz (sibling of #63) #76

@membphis

Description

@membphis

Background

The qjson cdylib is a decoder; cargo-fuzz (#63) covers it. But encoding
and materialize live in Lua
(qjson/table.lua, surfaced as qjson.encode
/ qjson.materialize) and are unreachable by cargo-fuzz — a different
toolchain with zero shared code.

#71 fixed a stack overflow in the encoder; that class of bug only gets
fuzz coverage through the Lua layer. This issue is the sibling of #63
(decoder-side fuzz).

Goal

Property / fuzz coverage for the Lua encode + roundtrip path:
decode(encode(x)) == x, plus encoder stack-depth safety.

Scope (this issue = one PR)

  • Evaluate luzer (LuaJIT libFuzzer binding) vs a busted
    property-test approach; pick one.
  • Roundtrip property: parse(x)materializeencode → re-parse,
    assert structural equality.
  • Encoder stack-depth property under deep nesting (relates fix(encode): add depth counter to prevent stack overflow #71).

Notes

Affected files

  • Lua-side fuzz / property harness (location TBD by the luzer-vs-busted choice)

Sibling of #63. Relates to #65, #71.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions