Artifact b98ba754997fe7c787b50ac5f339032c976f58063ebc1d4ff6551a4c8541455e:
- File
test/fuzz/fuzz_ops.c
— part of check-in
[11f47eadde]
at
2026-11-18 11:58:22
on branch trunk
— Record S0/S1 qualification groundwork before product code
Contract maps and pinned Pi reference, local C qualification fixtures, MC/DC and Fil-C remote lifecycle tooling, and the context transaction substrate probe. No product harness code yet. (user: dmestas, size: 1040) [annotate] [blame] [check-ins using]
/* libFuzzer target for the qualification operation-sequence boundary. * Bounded: cap_len is passed by the harness (max_len), and the parser itself * accepts at most Q_MAX_OPS operations. The oracle must never reject a * sequence the fixture produced from well-formed input. */ #include <stddef.h> #include <stdint.h> #include <stdlib.h> #include "qual.h" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size); int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { q_op ops[Q_MAX_OPS]; size_t n = q_parse_ops(data, size, ops, Q_MAX_OPS); q_ctx *c; q_trace t; const q_record *r; const q_effect *e; size_t nr, ne; if (n == 0 || n == SIZE_MAX) { return 0; } c = q_new(1); if (c == NULL) { abort(); } q_run_ops(c, ops, n, &t); r = q_records(c, &nr); e = q_effects(c, &ne); { char d[128]; if (q_oracle_check(ops, n, &t, r, nr, e, ne, d, sizeof d) != Q_OK) { abort(); } } q_free(c); return 0; }