J++Jsonic++
Living quality record · memory & resource safety

Leak testing that stays part of the release contract.

Memory safety is not a one-time badge. This page is the maintained record for Jsonic++ leak, lifetime and long-run resource testing. Results are only promoted here after the exact workload is reproducible; future parser changes are expected to rerun the same gates.

Standalone lifetime gate complete.The maintained parser corpus is green under ASan/LSan/UBSan, a long native RSS soak and an independent Valgrind run. The result is scoped to the retained workloads and current implementation; future parser changes are expected to rerun the same gates rather than inherit a permanent “no leaks” badge.

What we will measure

  • AddressSanitizer + LeakSanitizer on smoke, adversarial and malformed-input corpora
  • repeated parse / inspect / mutate / dump cycles after warm-up
  • named-array streaming callbacks, early exits and error paths
  • deeply nested objects/arrays, large strings and repeated allocation/free pressure
  • Valgrind leak classification on Linux as an independent allocator/lifetime oracle where practical
  • resident-memory trends during soak runs, interpreted separately from allocator caching

Checkpoint 1A evidence · 2026-08-18

The maintained lifetime corpus is green under sanitizers and a long RSS soak.

The corpus keeps one Jsonic++ process alive while repeatedly parsing, failing after partial allocation, mutating, copying/moving, dumping, streaming named arrays and taking early callback exits. A 120-iteration ASan + LSan + UBSan run completed with zero findings. A separate 400-iteration non-sanitized soak measured 10,624 KiB after warm-up, 10,688 KiB at midpoint and 10,688 KiB at completion: resident memory reached a stable band rather than continuing to grow. No production parser change was required by this checkpoint.

Checkpoint 1B evidence · 2026-08-18

The independent Valgrind gate passes.

On Linux x86_64, Valgrind 3.26.0 ran 40 maintained lifetime-corpus iterations against Jsonic++ commit b9d0ff3. The run completed with 0 errors, 0 bytes in use at exit, 6,579,515 allocations matched by 6,579,515 frees, and Valgrind reported that all heap blocks were freed. Peak process RSS under Valgrind was 215,992 KiB. Together with the 1A sanitizer and RSS-soak evidence, this satisfies the maintained Jsonic++ lifetime exit gate.

Acceptance rule

A stable RSS plateau is useful operational evidence but is not by itself proof of no leak. The strongest gate is zero sanitizer/Valgrind leak findings under the maintained workloads, plus no unexplained monotonic heap/RSS growth across long repeated runs.

Checkpoint plan

  1. Baseline harness. Pin compiler/sanitizer flags, record tool versions and create machine-readable summaries.
  2. Parser lifetime soak. Repeat representative valid and invalid parses thousands of times in one process.
  3. Mutation/serialization soak. Exercise construction, promotion, indexing, arrays and dump paths repeatedly.
  4. Streaming/error-path soak. Stress callback exits, malformed input and partial parsing cleanup.
  5. Independent leak oracle. Run the same focused corpus under Valgrind on Linux.
  6. Release gate. Turn the reproducible workload into a maintained test target and update this page whenever the implementation or evidence changes.

See Battle tested for the broader parser evidence and Production readiness for the maintained release assessment.