[libc-commits] [libc] [libc] Add a differential fuzzer for inet_aton (PR #200341)
Pavel Labath via libc-commits
libc-commits at lists.llvm.org
Tue Jun 2 03:59:05 PDT 2026
================
@@ -0,0 +1,46 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+///
+/// \file
+/// Differential fuzz test for llvm-libc inet_aton implementation.
+///
+//===----------------------------------------------------------------------===//
+
+#include "src/arpa/inet/inet_aton.h"
+#include <arpa/inet.h>
----------------
labath wrote:
Yeah, I think it only works because the functions are simple and independent.
There are a lot of possibilities here. I also expected two separate compilations. Linking two separate binaries (with extra glue code) would also be possible, but we'd probably need to link "our" implementation to the fuzzer binary, as it uses code coverage instrumentation to discover new paths (the system version isn't instrumented anyway, so it doesn't matter which binary it is in).
I could also imagine simply not building this in fullbuild mode, as I expect most differentially fuzzable functions to also be overlayable.
https://github.com/llvm/llvm-project/pull/200341
More information about the libc-commits
mailing list