test: add deterministic parser fuzzing
This commit is contained in:
1 parent
7756bd9f60
commit
52ccd3e001
5 files changed
+94
-1
No files matched your search
@@ -304,6 +304,8 @@ Stage: VERIFIED — Plans 01–19 + Plan 20 Slices 1–2C + Track A + Track B (B
|
||||
|
||||
- **Wave 105 (Sanitizer Groundwork)**: an ASan+UBSan build (`build/asan`) runs `vbs_core_tests` 7/7 clean with leak detection. It exposed a real VoidLibrary bug - `Argparse::option_default` use-after-free when the default aliases the output - filed as [Void/Library#62](https://git.faumaray.com/Void/Library/issues/62) and worked around by de-aliasing the `gc`/`clean` call sites. Full-binary ASan testing is limited because descriptor compilation does not inherit sanitizer flags (recorded as tooling work).
|
||||
|
||||
- **Wave 106 (Deterministic Parser Fuzzing)**: `CoreEngineTests.fuzz_mutated_inputs_never_crash_parsers` mutates TOML, JSON, lockfile and tar seeds (bit flips, truncation, overwrite runs, junk insertion; fixed xorshift seed, 200 iterations) and feeds them to `load_dependencies_toml`, `Void::Json::Strict::parse`, `parse_lockfile` and `extract_safe_tar`, with seed sanity checks guarding against a vacuous fuzz. Clean in the normal build and under ASan+UBSan with leak detection.
|
||||
|
||||
## Remaining future scope
|
||||
|
||||
- **Superiority plan ([22-superiority-and-gaps.md](../roadmap/22-superiority-and-gaps.md), 2026-12-05)**: revised platform strategy - **macOS deferred**, **Windows via MinGW-w64 cross-compilation + Wine execution** (`dev cpp-gcc -p pkgsCross.mingwW64.stdenv.cc`, `dev cpp-gcc -p wine64`), native MSVC deferred; plus packaging parity (ZIP/DEB/RPM), IDE ecosystem, migration tooling, test-runner parity, benchmarks, CI runners, and remote execution in prioritized order.
|
||||
|
||||
@@ -109,4 +109,5 @@ Base HEAD: `fe0d1a6`
|
||||
| Wave 103 (JUnit & test timeout) | `vbs test --junit FILE --test-timeout SECONDS` with aggregated JUnit XML | COMPLETE & VERIFIED (GCC 16.2, pin `0002e74`; JUnit assertions and CLI contract pass, full CTest 8/8) | `src/Main.cpp`, `tests/{FullV1Tests,CliContracts}.cpp/cmake`, docs |
|
||||
| Wave 104 (Competitor benchmark harness) | `benchmarks/compare.sh` timing VBS vs CMake/Ninja vs Meson; baseline recorded | COMPLETE & VERIFIED (baseline observed; VBS 2578/209 ms vs CMake 98/9 ms on a 20-source fixture) | `benchmarks/compare.sh`, `docs/roadmap/22-superiority-and-gaps.md`, docs |
|
||||
| Wave 105 (Sanitizer groundwork) | ASan+UBSan build runs core tests clean; found and filed Void/Library#62 (Argparse aliasing UAF) with a de-aliasing workaround | COMPLETE & VERIFIED (core 7/7 under ASan; normal CTest 8/8) | `src/Main.cpp`, `docs/agent-workflow/VERIFICATION.md`, Void/Library#62 |
|
||||
| Wave 106 (Parser fuzzing) | Deterministic mutation fuzz test over TOML/JSON/lockfile/tar parsers with seed sanity checks; ASan-clean | COMPLETE & VERIFIED (normal build and ASan+UBSan) | `tests/CoreEngineTests.cpp`, docs |
|
||||
| Future (Plan 20 Slice 3 / Tracks C, E3 editor extensions) |"}] Live `conan` CLI verification; macOS/Windows/cross-compile; binary-variant signing and key distribution; daemon-side dependency materialization and editor plugins; `Void::Net`/`Void::Sqlite` alignment | PLANNED (unimplemented) | [21-expansion-roadmap.md](../roadmap/21-expansion-roadmap.md), [20-future-translation-platforms.md](../roadmap/20-future-translation-platforms.md) |
|
||||
@@ -1496,6 +1496,22 @@ ASAN_OPTIONS=detect_leaks=1 build/asan/bin/vbs_core_tests --no-color
|
||||
recorded as tooling work (propagate sanitizer flags to descriptor compilation), not a code bug.
|
||||
- Normal build CTest after the fix: **8 / 8 passed** in 278.59 s.
|
||||
|
||||
## Deterministic Parser Fuzzing (GCC 16.2, pin `0002e74`)
|
||||
|
||||
```sh
|
||||
dev cpp-gcc -c build/pinned/bin/vbs_core_tests --filter fuzz_mutated_inputs_never_crash_parsers --no-color
|
||||
dev cpp-gcc -c cmake --build build/asan --parallel 8
|
||||
ASAN_OPTIONS=detect_leaks=1 UBSAN_OPTIONS=print_stacktrace=1 \
|
||||
dev cpp-gcc -c build/asan/bin/vbs_core_tests --filter fuzz_mutated_inputs_never_crash_parsers --no-color
|
||||
```
|
||||
|
||||
- 200 deterministic mutations (bit flips, truncation, overwrite runs, junk insertion) over TOML,
|
||||
JSON, lockfile and tar seeds fed to `load_dependencies_toml`, `Void::Json::Strict::parse`,
|
||||
`parse_lockfile`, and `extract_safe_tar`.
|
||||
- Normal build: **passed** (2.93 s). ASan+UBSan with leak detection: **passed** (3.05 s), no
|
||||
reports.
|
||||
- Seed sanity assertions ensure the unmutated inputs still parse.
|
||||
|
||||
## Limits and Unrun Checks
|
||||
|
||||
1. **HTTPS git fetch**: the host shell is proxy-restricted, but the Docker container could clone `https://git.faumaray.com/Void/VoidLibrary.git`; the pinned commit `3e254055e081a104f08df68dde39711bc7813518` was fetched directly for the verification above. A separate configure against the local `/home/faumaray/Projects/Library` checkout via `VBS_VOID_SOURCE_DIR` also succeeded (development-only override, checkout unmodified).
|
||||
|
||||
@@ -82,7 +82,7 @@ Concrete work this implies:
|
||||
5. Migration tooling (`vbs migrate`) and migrating VoidLibrary onto VBS (**trial verified**: VoidLibrary builds and tests with VBS in a separate clone; upstream #61 tracks the in-repo build description).
|
||||
6. Test-runner parity.
|
||||
7. Benchmarks against CMake/Meson/build2 on documented fixtures (including 10k-target scaling).
|
||||
8. CI on real runners, sanitizer jobs, parser fuzzing.
|
||||
8. CI on real runners, sanitizer jobs (**sanitizer build run done**), parser fuzzing (**deterministic mutation harness done**; coverage-guided libFuzzer still needs Clang).
|
||||
9. Remote execution workers.
|
||||
|
||||
## 6. Observed baseline (2026-12-05, x86_64, GCC 16.2, Debug, `benchmarks/compare.sh 20`)
|
||||
|
||||
Reference in new issue
Block a user