Semantic tests, libFuzzer targets, sanitizers, regressions, and source coverage.
lazybios uses complementary checks:
Fuzzing is not an oracle for SMBIOS meaning. Add a semantic test whenever a bug returns an incorrect value without triggering a sanitizer.
The semantic suite includes merged-file layout regressions for tightly concatenated tables and padded SMBIOS 2.x/3.x images whose entry points advertise a file-relative table offset.
Clang and its libFuzzer runtime are required. ASan and UBSan are enabled by default.
The final two arguments are seconds per target and maximum generated input size. The explicit large maximum exercises table-size and allocation arithmetic that a default small-input campaign can miss.
The two file targets load through lazybiosInit, so the type index is built from every arbitrary table they generate and is fuzzed alongside the loaders themselves.
Operating-system calls themselves, including FreeBSD and DragonFly BSD kenv(2), NetBSD's sysctlbyname, the NetBSD and SunOS (Solaris/illumos) /dev/smbios interfaces, and the physical-memory access used by Haiku, BeOS, MINIX 3, and the generic fallback (mmap, pread, and lseek/read), and QNX's mmap_device_memory(), are integration-tested on their native systems; fuzzing covers the byte-processing code after those calls return. Enable the optional native check with LAZYBIOS_TEST_HOST_BACKEND=ON. CTest reports it as skipped when the host does not expose SMBIOS data or the current account lacks access.
Use LAZYBIOS_FUZZ_LOGGING=ON to retain debug-only paths, including checksum evaluation. Configure LAZYBIOS_FUZZ_SANITIZERS=memory for an MSan campaign. fuzz/check_variants.sh configures, builds, and runs the default ASan-plus-UBSan, debug-logging, and MSan matrix. Configure with an empty sanitizer list and LAZYBIOS_FUZZ_COVERAGE=ON, then run fuzz/coverage.sh, to generate an aggregate HTML source-coverage report. The report requires llvm-profdata and llvm-cov from the Clang toolchain.
Full commands and crash-reproduction instructions are maintained in fuzz/README.md.