[libc-commits] [libc] [libc] Fix missing errno include in fuzzer (PR #144132)

Michael Jones via libc-commits libc-commits at lists.llvm.org
Fri Jun 13 10:57:16 PDT 2025


https://github.com/michaelrj-google created https://github.com/llvm/llvm-project/pull/144132

The printf parser uses errno for setting up the %m conversion. It was
presumably getting this include indirectly until a recent change. This
patch adds a direct dependency to fix it.


>From a43e0af37b120cfb90570c3f129f82808c2cde76 Mon Sep 17 00:00:00 2001
From: Michael Jones <michaelrj at google.com>
Date: Fri, 13 Jun 2025 10:56:04 -0700
Subject: [PATCH] [libc] Fix missing errno include in fuzzer

The printf parser uses errno for setting up the %m conversion. It was
presumably getting this include indirectly until a recent change. This
patch adds a direct dependency to fix it.
---
 libc/fuzzing/stdio/CMakeLists.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libc/fuzzing/stdio/CMakeLists.txt b/libc/fuzzing/stdio/CMakeLists.txt
index 8f89baa702000..401785a30469c 100644
--- a/libc/fuzzing/stdio/CMakeLists.txt
+++ b/libc/fuzzing/stdio/CMakeLists.txt
@@ -4,6 +4,7 @@ add_libc_fuzzer(
     printf_parser_fuzz.cpp
   DEPENDS
     libc.src.stdio.printf_core.parser
+    libc.src.errno.errno # needed for the strerror conversion
 )
 
 add_libc_fuzzer(



More information about the libc-commits mailing list