[libc-commits] [PATCH] D143784: [libc] Add basic fuzz target for the printf parser

Siva Chandra via Phabricator via libc-commits libc-commits at lists.llvm.org
Mon Feb 13 12:53:57 PST 2023


sivachandra added inline comments.


================
Comment at: libc/fuzzing/stdio/mock_arg_list.h:18
+namespace internal {
+class MockArgList : public ArgList {
+  int arg_counter = 0;
----------------
It's not clear to me as to how this `MockArgList` is helping the fuzzer. Can please add comments explaining this?


================
Comment at: libc/fuzzing/stdio/mock_arg_list.h:33
+
+  template <class T> LIBC_INLINE T next_var() {
+    ++arg_counter;
----------------
This is not a virtual function. So, who/what is supposed to make use of this method?


================
Comment at: libc/fuzzing/stdio/printf_parser_fuzz.cpp:20
+using namespace __llvm_libc;
+
+int arglist_func(const char *in_str, size_t size, ...) {
----------------
Please add a detailed comment about the fuzzing strategy that is being employed here.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D143784/new/

https://reviews.llvm.org/D143784



More information about the libc-commits mailing list