Overview
Introduction
This tool generates randomized fuzz input from a list of integers by independently mutating each digit at a chosen rate, useful for stress-testing how a parser or numeric input handler copes with noisy data.
It uses a seeded pseudo-random generator so a fuzzing run that turns up a bug can be exactly reproduced later from the same input, rate, and seed.
What Is Integer Digit Fuzzer?
A digit-level fuzz-input generator for lists of integers, one value per line, where every digit character is an independent candidate for random mutation.
At the chosen mutation rate, a digit is replaced with a different, randomly chosen digit 0-9; the sign character, if present, always passes through untouched.
How Integer Digit Fuzzer Works
The list is parsed and validated first; every non-blank line must be a plain integer, or the tool reports which line failed.
A mulberry32 pseudo-random generator, seeded from your chosen seed value, rolls against the mutation rate for every digit of every integer in turn.
Digits selected for mutation are replaced with a guaranteed-different digit (via a random 1-9 offset, mod 10); the sign character is sliced off before this process and reattached afterward.
When To Use Integer Digit Fuzzer
Use it to generate a batch of randomized-but-reproducible fuzzed integers for stress-testing a parser, deserializer, or numeric input handler.
It's also useful for property-based-testing style workflows where you want many slightly-varied malformed inputs derived from a known-good seed list.
Often used alongside Integer Digit Error Introducer, Integer Fuzzer and Integer Error Introducer.
Features
Advantages
- Reproducible randomness: the same input, rate, and seed always regenerate the exact same fuzzed output, so a bug-triggering case can be replayed.
- The mutation rate gives continuous control over fuzzing intensity, from light noise to heavy corruption.
- Preserves digit count and sign, so fuzzed values stay recognizably related to their originals for easier debugging.
Limitations
- Fuzzed integers can end up with leading zeros, since digit mutation intentionally doesn't renormalize the result.
- Only understands plain decimal integers, one per line; it has no notion of floating-point or other numeric formats.
- The randomness is deterministic given a seed, which is a feature for reproducibility but means it isn't a source of true entropy.
Examples
Best Practices & Notes
Best Practices
- Record the seed used for any fuzzing run that surfaces a bug, so the exact failing input can be regenerated.
- Sweep across a range of mutation rates to find the threshold where your parser starts failing.
Developer Notes
Mechanically identical to the Integer Digit Error Introducer's mulberry32-seeded per-digit mutation approach, kept as a separate lib/tool with its own default mutation rate (30%) and seed (42) and fuzz-testing-focused copy, since the two tools serve different framings (controlled corruption vs. open-ended fuzz input) despite sharing an implementation shape.
Integer Digit Fuzzer Use Cases
- Stress-testing an integer parser or deserializer with reproducible randomized noise
- Generating a batch of fuzzed test inputs derived from a known-good seed list
- Comparing parser robustness across a sweep of mutation rates
Common Mistakes
- Confusing this tool's fuzzing framing with the Integer Digit Error Introducer's controlled-corruption framing; they behave the same way but are meant for different workflows.
- Forgetting to record the seed when a fuzzed input reveals a bug, making it hard to reproduce later.
- Assuming a high mutation rate always produces a wildly different-looking number; short integers have fewer digits to mutate, so the effect is naturally smaller.
Tips
- Start at the default 30% rate and adjust up or down based on how aggressively you want to fuzz.
- Use several different seeds at the same rate to get a broader spread of fuzzed test cases.