Vixen
c7401864
csharp
public sealed class VxmlTarget

A .vxml file, parsed, printed, and reparsed after an edit.

Read the guide page for this →

Remarks

The first target here whose input is a language rather than a format, and the first to need IFuzzDomain. Byte havoc over a markup file produces text that dies in the lexer; what is worth reaching is behind it — the recovery paths that fabricate a missing token, the trivia bookkeeping that carries skipped source, and the incremental reparser that decides which subtrees it may keep. See SyntaxDomain for how an edit is chosen from the tree and carried in the text.

⚠ "Nothing escapes" is the weakest thing this target checks, and on its own it would prove very little. The parser is total by design — every file produces a tree, missing tokens are fabricated zero-width, unusable source travels as trivia — so it has no throwing paths to find and a run that only watched for exceptions would come back clean for ever. What can go wrong is a tree that is wrong: one that no longer reproduces its file, or one an incremental reparse disagrees with. Both are silent, both are checked here, and neither is visible to any of the four oracles.

Print-parse-print stability is deliberately not one of them, because it is implied. The round-trip below is byte-exact over arbitrary text, valid or not — so printing a parse is the identity function, and asking whether a second round of it is stable is asking the same question twice. The reparse oracle is the one that is not free.

Fields and properties (4)

  • public string Name

    What to call it on a command line and in a report.

  • public string What

    Which receive path this is, in one line.

  • public IFuzzDomain Domain

    How its inputs are made, or null for byte havoc.

  • public bool NoveltyGuides

    Whether novelty is worth keeping an input for.

Methods (3)

  • public long AllowanceFor(int inputLength)

    How many bytes an input may cause to be allocated.

  • public void Seed(ICollection<byte[]> corpus)

    Adds well-formed inputs for the mutator to start from.

  • public long Run(ReadOnlySpan<byte> input)

    Pushes one input through the decoder.

Used by (1)

  • FuzzTargetsVixen.Fuzz