Manuscript Offprint
arXiv:2610.23054Efficient Program Reduction for Library Fuzzing Harnesses
HAIYING LI*, The University of Hong Kong, lihy2022@connect.hku.hk
YUNLONG LYU*, The University of Hong Kong, yunlong.lyu97@gmail.com
PENG CHEN, Independent Researcher, spinpx@gmail.com
HAO CHEN, The University of Hong Kong, chenho@hku.hk
Library fuzzing harnesses translate generated inputs into API calls. When a complex harness triggers a crash, developers must determine whether the cause is a library defect or invalid harness usage. A smaller reproducer can simplify this investigation, but obtaining one requires repeatedly building and executing modified harnesses and analyzing their crashes, making manual or even automatic minimization time-consuming. Moreover, data-dependent statements prevent the reducer to remove unnecessary code and the heavy stack trace symbolization in libraries also slows down the candidate execution. To address these challenges, we present HarnessMinimizer, a system for efficient minimization of C/C++ library fuzzing harnesses. Its optimized pipeline reuses header analysis and prepared libraries and runtimes to reduce the work required to build and execute each simplified harness during the reduction process. It records and replays input values so that unnecessary input operations can be removed without changing the values supplied to surviving calls. It also uses a fast method to check whether each simplified harness preserves the original crash, avoiding repeated stack trace symbolization. We evaluate HarnessMinimizer with four reduction engines on 200 crash cases from 21 open source libraries. Compared with the unoptimized pipeline, HarnessMinimizer achieves speedups of 3.46–4.51× in average total wall time. Average harness size decreases from 1,352 original tokens to 143–263 remaining tokens after minimization. In crash triage using a large language model, accuracy in identifying harness bugs increases from 28% with the original harnesses to 44–51% with the minimized harnesses, while accuracy for library bugs remains at 100%.
CCS Concepts: • Software and its engineering → Software maintenance tools; Software testing and debugging; • Security and privacy → Software security engineering.
Additional Key Words and Phrases: Program reduction, fuzzing harness minimization, crash triage
ACM Reference Format:
Haiying Li, Yunlong Lyu, Peng Chen, and Hao Chen. 2018. Efficient Program Reduction for Library Fuzzing Harnesses. In Proceedings of Make sure to enter the correct conference title from your rights confirmation email (Conference acronym 'XX). ACM, New York, NY, USA, 21 pages. https://doi.org/XXXXXXX.XXXXXXX
1 Introduction
Library fuzzing searches for bugs by repeatedly exercising library APIs with fuzzer-generated inputs. A fuzzing harness connects these inputs to the APIs by constructing arguments, initializing library state, invoking functions, and releasing resources [4, 24]. Developers can write harnesses manually or use tools to generate them. Recent systems use large language models (LLMs) to generate harnesses from library declarations, documentation, and calling relationships [15, 22, 23, 37],
Authors contributed equally.
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from permissions@acm.org.
Conference acronym 'XX, Woodstock, NY
© 2018 Copyright held by the owner/author(s). Publication rights licensed to ACM.
ACM ISBN 978-1-4503-XXXX-X/2018/06
https://doi.org/XXXXXXX.XXXXXXX
Li et al.
132 extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { // ... input validation ... 137 FuzzedDataProvider fdp(data, size); // ... mode selection and layer counts ... 157 unsigned int base_width = fdp.ConsumeIntegralInRange<unsigned int>(64, 1920); // ... other input values and encoder configuration ... 237 err = vpx_codec_enc_init_ver(&encoder, encoder_iface, &cfg, flags, VPX_ENCODER_ABI_VERSION); // ... initialization checks, layer controls, and image allocation ... 356 int num_frames = fdp.ConsumeIntegralInRange<int>(2, 8); // ... frame duration ... 359 for (int frame_num = 0; frame_num < num_frames; ++frame_num) { // ... layer updates and frame construction ... 404 err = vpx_codec_encode(&encoder, &img, frame_num * frame_duration, frame_duration, frame_flags, VPX_DL_REALTIME); // ... output retrieval and further controls ... 423 } // ... encoder flushing ... 429 vpx_img_free(&img); 430 vpx_codec_destroy(&encoder); 432 return 0; 433 }
Fig. 1. Generated libvpx harness, abbreviated from 433 lines. Line numbers refer to the original source.
achieving significant improvement over OSS-Fuzz [30]. For example, PromptFuzz [23] utilize LLMs to generate harnesses with fuzzing feedback, achieving 61% more code coverage than OSS-Fuzz [30].
To increase coverage, a harness may support several testing modes, construct complex inputs, and exercise varied API combinations [9, 23]. This can require substantial source code to complete. Figure 1 shows an abbreviated example of a libvpx harness from our evaluation benchmark, whose 433 source lines cover encoder configuration, layer controls, frame construction, and encoding. On the one hand, the source files for existing fuzzing harnesses are lengthy: libxml2's fuzz/api.c, FFmpeg's tools/target_dec_fuzzer.c, and JPEG XL's tools/djxl_fuzzer.cc contain 3614, 656, and 613 lines, respectively [5, 7, 12]. On the other hand, harnesses generated by LLMs share the similar complexity: the 200 harnesses generated by PromptFuzz, PromeFuzz and FuzzAgent has an average length of 273 lines, as shown in Table 1. Such complexity is not merely an edge case and can substantially complicate the understanding of crashes exposed by a harness.
When crashes are discovered during library fuzzing, developers must then determine whether the crash comes from a library defect or invalid API usage in the harness. This crash triage depends on understanding the relevant calls and arguments to locate the root cause. However, recognizing such root causes in a large harness can be difficult because the relevant call and its arguments appear among many other API operations. Manually identify the root cause is time-consuming as it requires numerous attempts of simplification in the program code and checks for crash preservation . Program reduction addresses this problem by eliminating code that is irrelevant to the failure, thereby isolating the calls and values necessary to reproduce and explain the crash . It automates simplification by repeatedly modifying a program and retaining changes that preserve the behavior being investigated, which largerly reduces the manual effort required to isolate the root cause.
Many program reduction techniques have been developed and evaluated using test cases that trigger compiler bugs. C-Reduce combines transformations specialized for C/C++ [27], while Perses uses language grammars to avoid syntactically invalid candidates [32]. Vulcan introduces additional
Efficient Program Reduction for Library Fuzzing Harnesses Conference acronym 'XX, June 03–05, 2018, Woodstock, NY
transformations to expose further simplifications after a reducer reaches a local minimum [39]. WDD uses fragment sizes to guide partitioning and deletion decisions, improving reduction efficiency [44]. Their shared focus is on the reduction algorithm itself, improving its efficiency and effectiveness through the design of program transformations and search strategies.
However, directly applying existing program-reduction techniques to harness minimization is prohibitively inefficient. These techniques are largely designed for self-contained failure-inducing programs, such as compiler test cases, where each reduction query primarily transforms and tests a standalone source file. In contrast, reducing a fuzz harness requires repeatedly integrating the modified harness with the target library and its runtime environment, incurring substantial costs from compilation, linking, execution, and crash symbolization, which cannot be ignored. We identify three challenges that existing reduction engines do not address, which make harness minimization expensive and ineffective. First, each query repeats costly build and execution preparation, even though the library headers, target library, and supporting runtimes remain unchanged. Second, input-consumption dependencies constrain source deletion: removing one consumption operation can change the values supplied to surviving library calls even with the same crash input, forcing the reducer to retain otherwise irrelevant code. Third, symbolized crash comparison adds diagnostic overhead to each crashing query, as instruction addresses must be translated into function names and source locations to compare the crash location and calling context with those of the original execution. We elaborate on these three challenges in section 2.
We present HarnessMinimizer, a system for efficient automatic reduction of C/C++ library fuzzing harnesses. Its key observation is that reduction changes the harness while the library build, headers, and reference crash remain fixed. Building on existing reduction engines, HarnessMinimizer addresses the three challenges through a shared candidate testing pipeline. It reuses header analysis through precompilation and library code and initialization through a persistent runner, supporting both dynamic and static linking. Call-site replay preserves the recorded input values supplied to surviving operations, allowing the reducer to remove unnecessary consumption calls. A lightweight crash oracle combines diagnostic patterns with stable shared-library offsets, or stack depth as a coarser fallback, to filter candidates without repeated symbolization. After reduction, HarnessMinimizer embeds the surviving input values into the source and validates the resulting reproducer, exposing the relevant API calls and concrete arguments for debugging.
We evaluate HarnessMinimizer with four reduction engines—treereduce [3], Perses [32], WDD [44], and CDD [43]—on 200 crash cases from 21 open source libraries, comprising 100 library bugs and 100 harness bugs. Compared with the unoptimized pipeline for each engine, HarnessMinimizer achieves speedups in mean total wall-clock time. The original harnesses contain 1,352 source tokens on average; after reduction, the mean remaining size is 143–263 tokens across the four engines. In LLM-based crash triage, minimized harnesses improve accuracy in identifying harness bugs from 28% to 44–51%, while accuracy for library bugs remains at 100%.
This paper makes three contributions:
• A method tailored to library harness minimization. We design HarnessMinimizer to reuse stable build and execution preparation, preserve consumed input values across source deletions, and recognize reference crashes without repeated symbolization, addressing the costs and dependencies of reducing C/C++ library fuzzing harnesses.
• Demonstrated efficiency and crash triage benefits. Our evaluation on 200 crash cases from 21 libraries shows speedups in mean total wall time and a decrease in mean harness size from 1,352 to 143–263 tokens. The minimized harnesses improve LLM accuracy in identifying harness bugs from 28% to 44–51%.
Li et al.

Verdict guides the next candidate
Fig. 2. Challenges in existing harness minimization. Testing candidates repeats header processing, linking, runtime initialization, and symbolization, while deleting input operations can change the arguments passed to the library.
• Integration with multiple reduction engines. We provide adapters for treereduce, Perses, WDD, and CDD through a shared interestingness-test interface, allowing different reduction strategies to benefit from the same optimized harness testing pipeline.
2.1 Repeated Build and Execution Costs
Each query must turn a modified C/C++ harness into an executable computation. Compilation processes its included headers, checks declarations and types, and generates object code. Library headers can contain substantial amounts of code, including nested includes, inline functions, and templates [2]. Removing a few statements from the harness does little to reduce this work: the candidate still needs the same declarations to invoke the remaining APIs. A precompiled header (PCH) can cache header analysis [19], but reusing it requires a stable boundary between the cached declarations and the source being reduced. Template instantiation and code generation can also remain expensive even when header parsing is cached.
Compilation is followed by linking and process startup. With static linking, selected library object code is incorporated into the executable. The linker selects the required objects, resolves function and data references and adjusts addresses to match the executable's layout [8]. Compiling the library beforehand does not eliminate this work when each candidate is linked. With dynamic linking, the executable refers to shared library binaries loaded for execution. Starting the executable requires loading dependencies, resolving runtime references, and running initialization code [24]. For statically linked candidates, the linker must also search library archives and extract the required object-file members for each new executable, even though those archives remain unchanged [8].
Efficient Program Reduction for Library Fuzzing Harnesses Conference acronym 'XX, June 03–05, 2018, Woodstock, NY
// Crash input: {10, 20, 30, 40}. FuzzedDataProvider fdp(data, size); auto unused = fdp.ConsumeBytes<uint8_t>(2); // {10, 20} auto payload = fdp.ConsumeBytes<uint8_t>(2); // {30, 40} library_api(payload.data(), payload.size());
Fig. 3. An illustrative input consumption dependency. Deleting the unused consumption changes payload to , even though the crash input is unchanged.
Under either linking mode, building and starting a fresh executable repeats preparation of the same library and runtimes, even though reduction changes only the harness.
The opportunity for reuse is broader than header caching: most of the build and execution environment remains fixed across queries. Exploiting it requires separating that environment from the changing candidate. Execution reuse must also preserve isolation, since a candidate may crash or modify process state in ways that would affect the next query. The challenge is to reuse stable preparation while keeping candidate compilation and execution independent.
2.2 Input Consumption Dependencies
Preserving the original crash input does not necessarily preserve the arguments passed to the library. A libFuzzer harness receives an input buffer and its length [17], and may either pass these bytes directly to library APIs or consume them through FuzzedDataProvider (FDP) [21] to construct numbers, strings, and buffers. Because FDP consumes the input statefully, the value returned by each call depends on how many bytes have already been consumed by preceding calls [21]. Removing an earlier FDP operation can therefore shift subsequent consumption and change the arguments supplied to surviving library calls, even when the input itself remains unchanged.
Figure 3 illustrates this dependency. The first call consumes two bytes whose value is otherwise unused. The second returns the two bytes passed to the library. Deleting the unused call changes the second result from to . If the original crash requires , the interestingness test rejects the deletion. The reducer therefore retains the first call in the harness even though its result is unused. It survives because it advances FDP's consumption state, not because it contributes to the crash.
This dependency also arises when consumption sites execute in loops or when calls such as remaining_bytes() determine control flow. Deleting a consumption operation can then change values in later iterations or alter which library calls execute [11]. A useful reduction must decouple the values supplied by surviving sites from the consumption performed by deleted sites. It must also retain enough information to expose those values in the final reproducer. Otherwise, the developer still has to reconstruct the arguments from the original input and its parsing code.
2.3 Recognizing the Reference Crash Efficiently
Preserving the original input also does not guarantee that a reduced harness reproduces the same crash. Removing a setup or initialization call may place the library in a different state and trigger an unrelated failure. The crash oracle, which serves as the decision rule in the interestingness test, must therefore distinguish candidates that preserve the reference crash from those that merely crash for a different reason. Since distinct bugs can manifest as the same error category, existing approaches rely on stack-trace information to capture both the fault location and its calling context. FaST compares function names and their positions when grouping crash reports [29], while FuzzerAid matches the bug type, source location, and call stack when classifying crashing inputs [10].
Li et al.
(a) Symbolized crash location and caller
#0 av1_one_pass_cbr_svc_start_layer svc_layercontext.c:447:18 #1 av1_get_compressed_data encoder.c:5338:5
(b) Shared-library offsets
#0 (libaom.so+0x201cf25) #1 (libaom.so+0x1a9a22e)
(c) Statically linked executable
#0 (harness+0x13a81c5) #1 (harness+0xe7535e)
Fig. 4. Alternative representations of a libaom crash; path prefixes and later frames are omitted. Shared-library offsets refer to a fixed binary, whereas executable offsets can move when a candidate is relinked.
Obtaining these function names and source locations adds work to each crashing query. Stack unwinding records instruction addresses, and symbolization translates them into function names, files, and line numbers by locating and querying the corresponding binaries and debug information . When LLVM uses an external symbolizer, starting and communicating with a helper process adds to this work . Even a short harness can produce a time-consuming trace through a large library and its dependencies. Reducing the harness does not eliminate this translation for library frames, so many queries repeat this diagnostic work.
Disabling symbolization reduces diagnostic overhead but removes the source-level information used to characterize the crash. In Figure 4, function names and file-and-line locations are replaced by module names and numeric offsets, obscuring both the fault location and its calling context. Comparing these numeric entries across candidates is also difficult, as relinking a modified harness can move instructions within the executable, so the same fault may appear at different offsets. If disable symbolization, it bring challenges to distinguish changes caused by harness simplification from those indicating a different bug.
3 Design
HarnessMinimizer is designed to efficiently minimize harnesses built on top of existing program reduction engines, while addressing the challenges in section 2. The core idea behind HarnessMinimizer is to reduce the redundant work in harness minimization to enable efficient reduction. It separates the harness code being reduced from the information that should remain stable during reduction: the build environment, the values consumed from the crash input, and the reference crash. Figure 5 shows how these mechanisms cooperate. Given a harness, its crash input, and its header files and libraries used for compilation and linking, HarnessMinimizer first reproduces the original crash to collect the required crash signatures. Then it pre-compiles the header files and prepares a persistent runner that loads the target libraries that support runtimes to construct a reusable build and execution context, and records the input values consumed by FDP. An existing reduction engine then supplies candidates to a query procedure that compiles the changing code, executes it with the recorded input values, and returns an oracle verdict. When the reduction finishes, HarnessMinimizer restores the source needed for an ordinary build, embeds the surviving inputs, and validates the resulting reproducer. The reduction engine controls which transformations to try, while HarnessMinimizer controls how each transformation is evaluated. By integrating these mechanisms, HarnessMinimizer can significantly improve the efficiency and quality of harness minimization over existing program reduction approaches.
Efficient Program Reduction for Library Fuzzing Harnesses Conference acronym 'XX, June 03–05, 2018, Woodstock, NY

Fig. 5. Workflow of HarnessMinimizer in harness minimization.
3.1 Reusing the Build and Execution Environment
The first mechanism establishes a boundary around the changing harness body. On the compilation side, declarations outside this boundary are prepared once. On the execution side, the library and runtime implementations are prepared once. In the further reduction queries, only the changing harness body incurs additional overhead. A query rebuilds the body and connects it to these prepared components, while a separate child process isolates its execution.
3.1.1 Header Isolation with Precompilation. We isolate the stable context in a fixed header prefix by separating the headers from the harness code, leaving only a reducible harness body. For each harness, HarnessMinimizer automatically identifies the prefix by analyzing the include statements from the AST nodes of the harness. The harness body contains the remaining declarations and functions. The prefix is then compiled into a precompiled header (PCH) file, which is then used in subsequent compilations of the harness body and makes only the body available to the reduction engine. Each candidate compilation loads the same PCH, so source transformations do not trigger repeat analysis of the fixed headers. This approach avoids repeatedly parsing and analyzing the same headers for each candidate, significantly reducing compilation time.
This boundary preserves the interface against which candidates are checked. Macro definitions (e.g., #ifdef) that affect an include remain with that include, and the PCH and candidate builds use compatible compiler settings. The compiler still checks the modified body and performs the instantiation and code generation it requires. Precompiling the isolated prefix therefore removes repeated analysis without bypassing candidate type checking. The generated object code becomes the input to the execution mechanism below.
3.1.2 Dedicated Execution with the Persistent Runner. Precompilation reuses the declarations needed to compile a candidate, but an ordinary build still links the resulting object with the target libraries and starts a new executable for every query. We move the stable library implementations and their initialization outside this loop. A persistent runner retains the prepared execution environment, while each candidate becomes a harness plugin: a small shared object containing the changing harness code. The plugin leaves references to library APIs unresolved until loading, when they bind to implementations already available in the runner. This separation reuses both the linked library code and the process state established before harness execution.
Preparing the resident environment. Figure 6 shows the dynamic-library case. We first identify the target shared libraries retained by the original executable's dependency metadata. Using this set avoids introducing libraries discarded by the original link, whose dependencies or
Li et al.

Fig. 6. Persistent execution with shared target libraries. The parent prepares the resident environment before serving queries. Each query builds a plugin and creates a monitor and an executor; only the executor loads and runs candidate code. The parent survives crashes and supplies the prepared state to subsequent queries.
initialization could change execution, such as third-party libraries. The runner retains these dependencies at link time and opens the target libraries with dlopen using RTLD_NOW and RTLD_GLOBAL: symbol references are resolved eagerly, and the libraries' exported symbols become available to subsequently loaded plugins [13]. Library mappings, relocations, and constructors are thus prepared before candidate execution. The runner also initializes supporting runtimes and reads the crash input into memory, then remains alive in a request loop on a Unix-domain socket.
Executing a new candidate. Each query compiles the candidate body as position-independent code, links it into a plugin, and submits the plugin path to the runner. The runner starts a disposable monitor, which forks an executor. Only the executor loads the plugin, using RTLD_NOW to bind its external references to the inherited environment and RTLD_LOCAL to keep its definitions local to that load. It then locates LLVMFuzzerTestOneInput with dlsym and invokes it with the retained input buffer. The monitor collects the executor's output and exit status, enforces a timeout, and cleans up its process group before returning the crash report to the query procedure.
Reusing initialization through process inheritance. Both forks inherit the prepared address space without replacing it through exec. Linux implements this inheritance with copy-on-write: private memory pages remain physically shared until a process modifies them [14]. The executor therefore starts with the library code, loader state, and initialized data already in place, while its writes to private memory do not alter the parent's state. Loading the plugin only after forking also keeps candidate constructors out of the persistent parent. The next query derives from that parent again, so neither a crash nor mutations to library globals carry over through private memory. This fork-server design [4] removes repeated executable startup and preparation of the resident libraries. The remaining work in a candidate reduction query leaves only process creation, plugin loading and relocation, and harness execution. Process inheritance reuses library initialization as well as isolates private memory for each execution, so the persistent runner can handle more queries without repeated linking and restarting.
Making static libraries reusable. Direct loading of static libraries in the persistent runner is not feasible because a static archive cannot be opened with dlopen. We mitigate this issue by extracting the archive members and linking the required objects into the runner executable at build time. Figure 7 shows how we incorporate the required archive members into the runner
Efficient Program Reduction for Library Fuzzing Harnesses Conference acronym 'XX, June 03–05, 2018, Woodstock, NY
PREPARE ONCE: ARCHIVES BECOME PART OF THE RUNNER

Fig. 7. Preparing the runner from static archives. Symbols referenced by the original harness guide archive extraction; the selected implementation is linked into the runner and exported for dynamic lookup. The analysis object supplies symbol information only. The example shows api.o and its dependency selected while an unrelated member remains excluded.
executable and expose their APIs to plugins. This requires both selecting the code and exporting its symbols. Merely adding an archive to the runner's link command is insufficient: because the runner does not directly call the harness-specific APIs, the linker may leave their object files unselected. Conversely, including every archive member can introduce unrelated dependencies or constructors that the original harness never required.
To select the required code, we compile the original harness body once into an analysis object. Let U be its undefined symbols and D the symbols defined by the supplied archives. Their intersection identifies the library symbols referenced by that harness. We use R as the roots of archive extraction by marking these symbols as unresolved with the linker's -u option. This causes the linker to extract archive members that define the root symbols and transitively include additional members required to resolve newly introduced references. Grouping multiple archives allows such dependencies to be resolved across archive boundaries [8]. The analysis object supplies the roots but is not itself linked into the runner, keeping the original harness code and its initialization outside the persistent parent. The resulting runner contains the selected library implementation and is built as a non-PIE executable, allowing reuse of archive objects.
To make the selected library code callable from harness plugins, we expose its API symbols through the runner. As shown in Figure 7, we first change required APIs with hidden visibility to default visibility in archive copies (step ①), leaving the original libraries unchanged. The runner link then extracts the required archive members and their dependencies (step ②) and uses -export-dynamic to expose their externally visible definitions in the dynamic symbol table (step ③) [8]. If extraction roots are unavailable, step ② instead includes whole archives. At runtime, plugin API references bind to these exported definitions in the inherited executable. Candidates thus reuse both the library code and its initialized state, avoiding repeated archive extraction, library relocation, and library initialization.
3.2 Preserving Inputs with Call-Site Replay
To address the input consumption dependencies described in subsection 2.2, HarnessMinimizer records the values consumed from the crash input and replays them for surviving calls. This decouples the values supplied to the library from the operations that consume them, so a candidate
Li et al.
(a) Original harness
Input: {10, 20, 30, 40}
(b) Instrument and record
Assign stable call-site IDs
(c) Reduce with replay
Preserve IDs after deletion
auto unused =
fdp.ConsumeBytes(2);
auto payload =
fdp.ConsumeBytes(2);
library_api(payload);
Delete the first call without replay
Shared FDP state shifts
API input becomes {10, 20}
auto unused =
fdp.ConsumeBytes(2, 101);
auto payload =
fdp.ConsumeBytes(2, 102);
// payload = {30, 40}
library_api(payload);
execute once
ID Recorded result
101 {10, 20}
102 {30, 40}
auto unused =
fdp.ConsumeBytes(2, 101);
// redundant call deleted!
auto payload =
fdp.ConsumeBytes(2, 102);
library_api(payload);
Replay the record for ID 102
API input stays {30, 40}
Fig. 8. Call-site replay decouples input consumption: after call 101 is deleted, call 102 still supplies to the API. Code is schematic: ConsumeBytes denotes FDP byte consumption, and added arguments are call-site IDs instrumented by HarnessMinimizer. The reduction deletes a redundant FDP call.
can delete calls that advance FDP’s consumption state without changing the values seen by surviving calls. Figure 8 illustrates how HarnessMinimizer binds consumed values to FDP call sites to remove input consumption dependencies. In panel (a), the first call consumes into an unused variable, while the second supplies to the library API. Simply deleting the first call shifts the second call’s input to that alters the crash behaviors. To break this dependency, HarnessMinimizer instruments each call site with a stable ID inserted as an additional argument to record the input bytes consumed by this call, then executes the original harness on the crash input to record the results under their IDs. Panel (b) associates IDs 101 and 102 with and , respectively. During reduction, surviving calls retain their IDs and retrieve the associated records instead of consuming bytes from the shared FDP state. Thus, the candidate in panel (c) can delete call 101 while call 102 still supplies to the API. Recording and replaying results by call site allows the reducer to remove operations retained only to advance FDP’s consumption state. This association follows the broader idea of preserving relationships between generated values and consuming operations across executions [11, 28].
FDP calls inside loops. A call site inside a loop keeps the same ID across iterations but may return a different value on each execution. HarnessMinimizer therefore records an ordered sequence for each site , rather than a single value. Before executing each candidate, replay resets an independent cursor for every sequence. The th execution of site returns and advances only that site's cursor, so deleting another call from the loop does not shift the sequence replayed at . If the candidate executes fewer times, it uses only a prefix of the recorded sequence; if it requests more values than were recorded, replay terminates the execution instead of consuming new bytes. FDP state queries used in loop conditions, such as remaining_bytes(), are also assigned IDs and replayed from their own sequences.
Reusing the replay runtime. FDP extensively uses template functions to adapt to different argument types while preserving the same underlying data-consumption logic. To avoid repeatedly compiling FDP’s template-based replay logic during reduction, HarnessMinimizer analyzes the
Efficient Program Reduction for Library Fuzzing Harnesses Conference acronym 'XX, June 03–05, 2018, Woodstock, NY
original harness to identify the concrete types used by its FDP calls. We generate explicit instantiations [1] of the corresponding template functions in a separate compilation unit and compile them, together with trace loading and per-site replay support, into a shared library. The persistent runner links against this library and loads it before forking candidate processes (subsubsection 3.1.2), allowing successive queries to reuse the loaded code and fixed initialization while retaining independent replay state in each child. PCH reuse the instantiated FDP header to reduces expensive template resolving and the persistent runner reduces repeated FDP object generation and setup.
Input Inlining in the final reproducer. The final reproducer currently exposes the values consumed by surviving calls via a customized replay runtime, i.e., the instrumented FDP header. To make the reproducer self-contained, as well as reduce customized dependency requirements in bug reports to communities, HarnessMinimizer inlines the recorded values into the source. Each surviving call is replaced with a literal or container initializer for its recorded value, and any large buffers or repeated sequences with elements larger than 128 are placed in a supporting header. With the inlined values, the reproducer can be built and executed without the replay runtime. Developers can inspect the concrete input values directly in the source, reducing the additional debugging effort needed to understand the crash.
3.3 Fast Crash Oracle Without Heavy Symbolization
Precise recognition of the reference crash with symbolization is expensive (subsection 2.3). Each query must determine whether the candidate retains the reference crash while keeping diagnostic processing inexpensive. HarnessMinimizer therefore compares crashes using unsymbolized stack evidence. During reduction, symbolization is disabled while stack unwinding and sanitizer diagnostics remain enabled [16]. The resulting report retains the evidence needed for comparison without repeatedly translating instruction addresses into symbol names and source locations [18].
Collecting crash signatures. Before reduction, HarnessMinimizer executes the original harness through the same execution arrangement used for candidates. It records a crash pattern from sanitizer warnings about the reported error category or stable diagnostic wording, removing incidental values such as changing addresses. A candidate must crash and match this pattern, then satisfy a stack-based check. For this check, HarnessMinimizer selects the library offset as oracle for dynamic linking or the stack depth as oracle for static linking bypassing heavy symbolization.
Offset oracle for dynamic linking. We record the instruction offset of the first target-library frame in the reference crash stack reported by the sanitizers. In a candidate report, the first frame from the recorded library must have the same offset. A different offset, or the absence of the required library frame, prevents acceptance even when the crash pattern matches. Because the library binary remains fixed throughout reduction, its internal offsets retain their meaning as the harness changes. The oracle thus compares the observed library location directly, without recovering its function name or source line.
Depth oracle for static linking. When static library code is incorporated into the runner, its frames are reported under the executable rather than a separate target-library module. Therefore, we compare the number of frames in its first crash stack with the corresponding count from the candidate, together with the crash pattern. Both counts are obtained through the same execution arrangement, so runner frames are accounted for consistently. We count only the crash stack, excluding additional allocation or deallocation traces in sanitizer reports. Stack depth provides a coarse structural constraint: different faults can share both an error pattern and a frame count, so this oracle serves as a filtering heuristic during reduction. The collision of different faults with the same depth is possible, but rare. To detect such collision, the final reproducer is validated with symbolization and reports a collision to users. Users can then repeat reduction from the original
Li et al.
harness with symbolized crash comparison or switch to dynamic linking when a shared library build is available, as discussed in section 6.
4 Implementation
HarnessMinimizer is implemented primarily in Python and C++, with approximately 9,400 lines of source code. Python coordinates source transformation, compilation, and crash checking, while C++ implements the persistent runner and replay runtime described in subsubsection 3.1.2 and subsection 3.2.
Source Transformation and Input Replay. We use Tree-sitter’s C++ parser [34] to identify FDP call sites for instrumentation and replace surviving calls with recorded values in the final reproducer. For repeated calls, input inlining emits value sequences and indices; large buffers are placed in a supporting header. For harnesses that consume the input buffer directly, we bind the fuzzing entry point’s parameters to the embedded crash bytes. Clang builds libraries with AddressSanitizer [31] and UndefinedBehaviorSanitizer [20] instrumentation.
Reduction Engine Integration. We integrate treereduce [3], Perses [32], WDD [44], and CDD [43] through a shared interestingness test. Adapters translate its verdict into each engine's acceptance convention, giving all engines the same optimization provided by HarnessMinimizer.
5 Evaluation
To demonstrate the efficiency and effectiveness of HarnessMinimizer, we evaluate its performance on an extensive set of 200 crash cases across 21 open source libraries. To construct such an evaluation set, we first collected 100 crashes from the artifacts released by PromptFuzz [23], PromeFuzz [15] and FuzzAgent [22], and confirmed as library bugs by maintainers. Then we complemented them by executing these three systems to collect 100 additional crashes reported as harness bugs and confirmed through manual analysis, which were used as negative samples for crash triage in subsection 5.3. Since HarnessMinimizer does not rely on a specific reduction engine, we evaluate it with four popular program reduction engines: treereduce [3], Perses [32], WDD [44], and CDD [43]. The evaluation examines HarnessMinimizer on the following aspects: reduction performance in subsection 5.1, effectiveness of each component in subsection 5.2, and impact on crash triage in subsection 5.3.
All reduction experiments run in an Ubuntu 24.04.4 LTS environment on a server with two Intel Xeon Platinum 8580 processors (120 physical cores / 240 threads, 2.0 GHz) and 2 TiB of RAM. We use Clang 21.1.8 and GNU ld 2.42 as the compilation tools.
5.1 Reduction Performance
We evaluate the time required to minimize a harness and the resulting source size by integrating HarnessMinimizer with treereduce [3], WDD [44], CDD [43], and Perses [32]. To ensure consistent evaluation, each engine was configured to use only one worker under a sequential candidate generation and interestingness testing setting, eliminating implementation variance of different parallelization strategies in these systems. In the reduction processes, we didn’t impose fixed budget on number of reduction rounds or an overall time. Instead, each engine runs to its own fixed point until a complete round finds no further simplification that preserves the reference crash. For each engine, we compare a baseline (Base) and an optimized configuration (Opt) with HarnessMinimizer on the same 200 cases, using the same original harnesses, crash inputs, and library builds. Base rebuilds and reduces each candidate directly and checks crashes with symbolization enabled. Opt uses all of HarnessMinimizer’s optimization methods (section 3). We measure the total wall-clock time [26], including preparation, reduction, input inlining, and final validation, and count the source tokens remaining in the reduced harness. Table 1 reports these results. For readability, it displays
Efficient Program Reduction for Library Fuzzing Harnesses Conference acronym 'XX, June 03–05, 2018, Woodstock, NY
Table 1. Harness sizes and reduction results for 21 selected cases and the full benchmark.
| Original | treereduce [3] | WDD [44] | CDD [43] | Perses [32] | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Crash case | LoC | Tokens | Base | Opt | Base | Opt | Base | Opt | Base | Opt | ||||||||
| Time | Size | Time | Size | Time | Size | Time | Size | Time | Size | Time | Size | Time | Size | Time | Size | |||
| c-ares-1 | 258 | 1342 | 1181 | 403 | 218 | 392 | 1307 | 251 | 280 | 240 | 1062 | 251 | 232 | 240 | 1107 | 253 | 241 | 242 |
| cjson-1 | 280 | 1263 | 10276 | 343 | 1812 | 324 | 706 | 159 | 159 | 148 | 611 | 159 | 142 | 148 | 581 | 161 | 137 | 150 |
| curl-2 | 187 | 848 | 475 | 69 | 102 | 52 | 234 | 35 | 73 | 31 | 219 | 35 | 71 | 31 | 182 | 35 | 63 | 31 |
| exiv2-1 | 37 | 192 | 269 | 173 | 106 | 172 | 247 | 78 | 92 | 55 | 219 | 78 | 84 | 55 | 223 | 78 | 85 | 55 |
| lcms-1 | 329 | 1619 | 2185 | 236 | 385 | 236 | 585 | 66 | 207 | 59 | 546 | 66 | 207 | 59 | 519 | 66 | 177 | 59 |
| libaom-1 | 263 | 1574 | 1345 | 309 | 289 | 279 | 1405 | 242 | 368 | 231 | 1187 | 242 | 324 | 231 | 1156 | 242 | 307 | 231 |
| libjpeg-turbo-1 | 182 | 1106 | 694 | 132 | 148 | 124 | 458 | 56 | 123 | 28 | 412 | 56 | 114 | 28 | 402 | 56 | 110 | 28 |
| liblouis-1 | 276 | 1195 | 1432 | 344 | 307 | 340 | 943 | 218 | 234 | 201 | 828 | 218 | 206 | 201 | 832 | 230 | 203 | 213 |
| libmagic-1 | 487 | 2613 | 3598 | 289 | 699 | 259 | 643 | 92 | 151 | 81 | 583 | 92 | 141 | 81 | 550 | 92 | 132 | 81 |
| libpcap-1 | 179 | 948 | 9621 | 382 | 1817 | 327 | 532 | 112 | 130 | 95 | 515 | 112 | 126 | 95 | 528 | 124 | 129 | 107 |
| libpng-1 | 273 | 1090 | 11250 | 474 | 2086 | 444 | 1525 | 677 | 338 | 667 | 1394 | 677 | 309 | 667 | 1389 | 683 | 278 | 673 |
| libtiff-1 | 162 | 692 | 1116 | 277 | 213 | 241 | 700 | 154 | 142 | 132 | 590 | 154 | 127 | 132 | 629 | 154 | 119 | 143 |
| libvpx-1 | 161 | 992 | 1061 | 243 | 203 | 194 | 552 | 114 | 135 | 100 | 582 | 114 | 141 | 100 | 388 | 88 | 93 | 77 |
| opencv-1 | 295 | 1874 | 6764 | 535 | 1867 | 508 | 2356 | 349 | 1188 | 334 | 2206 | 349 | 1136 | 334 | 3045 | 351 | 1078 | 334 |
| openssl-1 | 319 | 1491 | 2185 | 195 | 271 | 137 | 421 | 77 | 87 | 60 | 409 | 77 | 90 | 60 | 379 | 77 | 83 | 60 |
| protobuf-1 | 333 | 1489 | 1182 | 158 | 269 | 129 | 780 | 70 | 207 | 39 | 711 | 70 | 194 | 39 | 692 | 70 | 188 | 39 |
| pugixml-1 | 213 | 1287 | 851 | 168 | 182 | 163 | 679 | 312 | 173 | 307 | 607 | 312 | 159 | 307 | 577 | 312 | 150 | 307 |
| re2-1 | 349 | 1427 | 1152 | 284 | 230 | 274 | 817 | 125 | 181 | 114 | 748 | 125 | 174 | 114 | 672 | 115 | 154 | 104 |
| sqlite-1 | 447 | 2015 | 1490 | 571 | 307 | 539 | 1483 | 189 | 370 | 174 | 1283 | 189 | 312 | 174 | 1040 | 214 | 314 | 203 |
| tinygltf-1 | 351 | 1542 | 2461 | 288 | 1067 | 274 | 1368 | 146 | 720 | 146 | 1057 | 115 | 376 | 101 | 932 | 116 | 679 | 110 |
| zlib-1 | 194 | 896 | 1035 | 346 | 211 | 324 | 1086 | 136 | 213 | 115 | 1029 | 136 | 183 | 115 | 871 | 136 | 172 | 115 |
Summary over all 200 cases
| Min | 35 | 138 | 50 | 23 | 39 | 23 | 49 | 21 | 44 | 20 | 47 | 21 | 42 | 20 | 46 | 21 | 41 | 20 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Mean | 273 | 1352 | 2408 | 283 | 534 | 263 | 974 | 156 | 276 | 143 | 871 | 157 | 249 | 143 | 808 | 156 | 233 | 143 |
| Median | 270 | 1272 | 1322 | 270 | 288 | 252 | 822 | 136 | 203 | 118 | 720 | 136 | 190 | 117 | 671 | 136 | 172 | 117 |
| Max | 839 | 4740 | 33989 | 1084 | 8739 | 1063 | 3981 | 745 | 2511 | 731 | 5935 | 745 | 2010 | 731 | 3429 | 745 | 2002 | 731 |
Notes. LoC: line of code; Tokens / Size: original / remaining source tokens; Time: total wall time (s). Base / Opt: baseline / optimization with HarnessMinimizer. Values are rounded to integers. Opt shading: gray for Time, blue-gray for Size.
the first case from each of the 21 libraries, followed by the minimum, arithmetic mean, median, and maximum over all 200 cases.
Reduction time. HarnessMinimizer reduces mean total wall time for all four engines. For treereduce, the mean falls from 2,408 to 534 seconds; for WDD, from 974 to 276 seconds; for CDD, from 871 to 249 seconds; and for Perses, from 808 to 233 seconds. Dividing the baseline mean by the optimized mean gives speedups of , , , and , respectively. Median times also decrease for every engine, from 671–1,322 seconds under four base engines to 172–288 seconds under optimization with HarnessMinimizer. The maximum observed time for treereduce decreases from 33,989 to 8,739 seconds, shortening the longest run from approximately 9.4 to 2.4 hours. Minimum times also decrease for every engine, from 46–50 seconds under Base to 39–44 seconds under HarnessMinimizer. These results demonstrate that HarnessMinimizer can consistently reduce the time required to minimize a harness across different engines and achieve improvement over all cases, with the largest speedup of observed in treereduce [3].
Li et al.
Reduction size. The original harnesses contain 1,352 source tokens on average. With Harness-Minimizer, the mean remaining size is 263 tokens for treereduce and approximately 143 tokens for each of WDD, CDD, and Perses, achieving a mean reduction rate of 80.55% for treereduce and 89.43% for the other engines. Compared with their baseline settings, HarnessMinimizer decreases the mean remaining size range from 7.1% to 8.9%. For the largest case with the original size of 4,740 tokens, HarnessMinimizer reduced 77.57% tokens on treereduce and 84.57% on the other engines. For the smallest case with the original size of 138 tokens, HarnessMinimizer still reduced 83.33% tokens on treereduce and 85.51% on the other engines. These results show that HarnessMinimizer can consistently reduce the size of minimized harnesses across different engines and achieve improvement over all cases, with the largest reduction rate of 89.43% observed in Perses [32].
5.2 Effectiveness of Each Component
We evaluate how HarnessMinimizer's components affect candidate testing cost, harness size, and crash preservation. For the timing study, we use the same 200 cases, four engines, Base/Opt configurations, and sequential execution settings as in subsection 5.1, running each engine to its fixed point. We measure compilation, linking, and execution times separately. Compilation averages include candidates that build successfully. Linking and execution averages include queries that reach the respective stage. Execution time includes diagnostic reporting. Throughput counts queries per second over the reduction search. For each metric, we first compute the average within each case and then average over all 200 cases. The speedups in Table 2 are ratios of these means, using Base/Opt for times and Opt/Base for throughput. This breakdown measures the combined effect of the optimizations active at each stage. We then use treereduce to evaluate input replay and crash-oracle decisions separately.
Table 2. Candidate testing costs and throughput across four reduction engines.
| Stage time (ms) | Throughput (queries/s) | ||||||
|---|---|---|---|---|---|---|---|
| Engine | Statistic | Compile | Dynamic link | Static link | Execute | Dynamic link | Static link |
| treereduce | Base | 1065.23 | 195.62 | 742.67 | 175.68 | 1.31 | 0.70 |
| Opt | 111.52 | 67.16 | 64.27 | 50.37 | 4.75 | 3.60 | |
| Speedup | 9.55× | 2.91× | 11.56× | 3.49× | 3.63× | 5.14× | |
| Perses | Base | 1020.45 | 187.35 | 694.61 | 261.32 | 1.53 | 0.73 |
| Opt | 105.43 | 66.29 | 63.94 | 108.93 | 4.63 | 3.92 | |
| Speedup | 9.68× | 2.83× | 10.86× | 2.40× | 3.03× | 5.37× | |
| WDD | Base | 1010.38 | 187.04 | 687.16 | 261.28 | 1.56 | 0.75 |
| Opt | 105.50 | 66.09 | 63.67 | 112.26 | 4.70 | 3.96 | |
| Speedup | 9.58× | 2.83× | 10.79× | 2.33× | 3.01× | 5.28× | |
| CDD | Base | 1025.04 | 190.64 | 699.47 | 289.55 | 1.49 | 0.73 |
| Opt | 108.73 | 67.47 | 64.19 | 115.49 | 4.49 | 3.91 | |
| Speedup | 9.43× | 2.83× | 10.90× | 2.51× | 3.01× | 5.36× | |
Notes. Base and Opt use the configurations in subsection 5.1 and report arithmetic averages over 200 cases. Speedups use the reported averages: Base/Opt for times and Opt/Base for throughput.
Overhead Breakdown. To evaluate how each component of HarnessMinimizer contributes to the overall performance improvement, we executed one candidate testing cycle for each of the four
Efficient Program Reduction for Library Fuzzing Harnesses Conference acronym 'XX, June 03–05, 2018, Woodstock, NY
engines, and measured the time spent in compilation, linking, and execution stages. Table 2 shows the detailed overhead breakdown and the corresponding speedups. Compilation achieves speedups of . For example, the mean compilation time for treereduce decreases from 1,065.23 to 111.52 ms, showing that HarnessMinimizer can reduce significant cost of repeated header analysis through PCH, which leaves less code to process for each candidate (subsubsection 3.1.1). Linking achieves speedups of under dynamic linking and under static linking. The persistent runner retains the target libraries and supporting runtimes, so successive candidates require only a small harness plugin to be linked (subsubsection 3.1.2). Mean execution time decreases by factors of . Forking the prepared runner and using the unsymbolized crash oracle reduce repeated process initialization and diagnostic processing (subsection 3.3). Together, these optimizations yield query throughput speedups of under dynamic linking and under static linking across the four engines.
Input recording and replay. We evaluate whether preserving consumed values enables more extensive reduction. We take treereduce as a research target and compare the reduction quality with and without replay (subsection 3.2). Of the 200 cases, 166 use FDP for dynamic bytes consumption. We therefore measure remaining source tokens and explicit FDP calls before input inlining procedure when reaching the fixed point. Each call site is counted once, including sites inside loops. Table 3 shows that replay decreases mean remaining size from 391.48 to 327.49 tokens, a reduction. The mean percentage of original tokens removed increases from to , or 4.30 percentage points. The effect on input operations is larger: mean remaining FDP calls decrease from 9.10 to 5.24, a reduction. These results support recording consumed values can remove needless FDP calls used only to preserve the consumption state, thus achieving better reduction quality.
Table 3. Effect of input replay on harness size before input inlining.
| Source tokens | FDP calls | ||||
|---|---|---|---|---|---|
| Configuration | Original | Remaining ↓ | Removed (%) ↑ | Original | Remaining ↓ |
| Without replay | 1497.02 | 391.48 | 71.66 | 28.07 | 9.10 |
| With replay | 1497.02 | 327.49 | 75.96 | 28.07 | 5.24 |
Notes. Values are arithmetic means over 166 FDP cases. indicate that lower/higher values are better, respectively.
Crash oracle. We evaluate whether HarnessMinimizer's oracles preserve the original crash while avoiding repeated symbolization during candidate testing. Under dynamic linking, the offset oracle matches the crash pattern and the instruction offset within the target library. When only static libraries are available, the depth oracle matches the pattern and the number of frames in the unsymbolized stack trace (subsection 3.3). Reducing all 200 cases with optimized treereduce produces 551,812 queries. For each query, we record the judgments of the offset, depth, and symbolized oracles, then compare each unsymbolized oracle's verdict with the symbolized verdict. Table 4 reports disagreements and the number of cases in which manual review of the final reproducers identified a changed crash.
The offset and symbolized oracles return the same verdict for of queries. They disagree on 15,243 queries across 14 cases. In 6,544 of these queries, covering four cases, the candidate trace contains the same function call sequence as the reference, but source line numbers in caller frames differ. In the other 8,699 queries across ten cases, the function call sequence also differs. Manual review confirms that the final reproducers in all 14 cases retain the original crash. These results
Li et al.
Table 4. Crash oracle comparison.
| Oracle | Total queries | Mismatch queries | Mismatch cases | Changed cases |
|---|---|---|---|---|
| Offset | 551,812 | 15,243 | 14 | 0 |
| Depth | 551,812 | 16,872 | 21 | 4 |
Offset and depth apply to dynamic and static linking, respectively. Mismatches are disagreements with symbolized comparison. The last column counts cases whose final reproducers trigger a different crash, as confirmed by manual review.
Table 5. Crash triage accuracy.
| Harness | Mean tokens | Library bugs | Harness bugs |
|---|---|---|---|
| Original | 1352 | 100% | 28% |
| treereduce | 263 | 100% | 44% |
| Perses | 143 | 100% | 51% |
Mean source tokens; accuracy over 100 cases per bug category; for treereduce and Perses, we use harnesses reduced by HarnessMinimizer.
support using the library crash location to guide reduction even when the calling context changes, allowing HarnessMinimizer to avoid repeated symbolization during candidate testing.
The depth and symbolized oracles return the same verdict for 96.94% of queries. They disagree on 16,872 queries across 21 cases. Of these disagreements, 15,287 queries arise from 17 cases with differences in source locations or function call sequences, but manual inspection finds that the final reproducers still trigger the original crash. The remaining 1,585 disagreements arise from four cases whose final reproducers trigger crashes at different locations while still matching the reference pattern and stack depth. The high agreement supports using stack depth for crash comparison under static linking, while the offset oracle provides more precise location evidence for preserving the original crash when stable offsets are available.
5.3 Impact on Crash Triage
We evaluate whether reduced harnesses help an LLM distinguish library defects from harness errors. We compare three configurations on the same 200 crashes (including 100 library bugs and 100 harness bugs) used in subsection 5.1: the original harness without reduction, the harness reduced by HarnessMinimizer with treereduce, and the harness reduced by HarnessMinimizer with Perses. We follow a one-shot LLM-based crash validation to triage these crashes by providing the harness code and its corresponding crash stacks to LLMs, which is used in PromeFuzz [15]. We use GLM-5.3 [6] with high reasoning effort as the judge model. We evaluate each crash case independently on 20 times to reduce the effect of randomness in LLM inference. The final classification is determined by the majority vote of the 20 results and compared with the ground truth. For 10 vs. 10 voting cases, we verify the classification manually.
Table 5 reports the mean harness size in source tokens and classification accuracy separately for library bugs and harness bugs. Each accuracy is the fraction of the 100 cases in that category classified correctly. Library-bug accuracy remains at 100% across all three configurations. In contrast, harness-bug accuracy increases from 28% with the original harnesses to 44% with treereduce and 51% with Perses, gains of 16 and 23 percentage points, respectively. Thus, minimization of harness code effectively improves the accuracy for triaging library fuzzing crashes. Especially for crashes caused by harness bugs, the triage on the reduced harnesses with Perses achieve 82.14% more accurate classification than the original harnesses, which can help developers quickly identify the root cause of the crash and find the valid ones among the library crash candidates.
These results are consistent with the LLM favoring a plausible library-bug explanation when a crash manifests inside library code. That explanation fits actual library bugs, but API misuse in the harness can produce similar symptoms. In an unreduced harness, extensive initialization and unrelated API operations may obscure the relevant misuse. Reduction concentrates the supplied context on the calls and inclined input values that reproduce the crash, making the relevant API
Efficient Program Reduction for Library Fuzzing Harnesses Conference acronym 'XX, June 03–05, 2018, Woodstock, NY
usage easier to inspect. This offers a plausible explanation for the improved identification of harness bugs while library-bug accuracy remains unchanged.
6 Discussion
Implications. The improvements across four reduction engines show that reducing repeated work in candidate testing can benefit different reduction strategies (subsection 5.1). Separating the changing harness from its reusable build and execution environment allows these improvements without requiring a new reduction algorithm. Input replay further supports simplification by allowing the removal of operations retained only to advance input consumption. The resulting reproducers expose the remaining API calls and their concrete arguments, making the relevant library usage easier to inspect. The improved identification of harness bugs in our LLM study (subsection 5.3) provides evidence that this simplification can also assist crash triage, supporting the use of harness minimization between crash discovery and investigation.
Limitation. The usefulness of these reproducers depends on retaining the reference crash. Under static linking, the depth oracle compares the crash pattern and frame count, providing less location information than a library offset or a symbolized trace. Manual review identified collisions in four of the 200 final reproducers evaluated with this oracle (2%). Three crashed in different library functions, and one crashed in replay code, while the reference pattern and stack depth remained unchanged (Table 4). These cases illustrate the tradeoff between inexpensive candidate testing and precise crash discrimination. The final symbolized validation described in subsection 3.3 checks for such changes after reduction. If it detects a collision, users can repeat reduction from the original harness with symbolized crash comparison. When a shared library build is available, the offset oracle provides more precise location evidence while retaining the benefit of avoiding repeated symbolization.
Threats to validity. Timing measurements can vary with CPU scheduling and contention from other tasks, while LLM classifications can vary across repeated requests. We improve comparability by using the same cases and build environment with one worker per reduction run. For triage, we reduce the influence of individual responses through 20 classifications and majority voting, with tied votes resolved manually. The magnitude of the observed improvements may also vary across settings. Different hardware and toolchains change the relative costs of candidate testing, while different models, prompts, and inference settings may change the benefit of minimization for crash triage.
7 Related Work
7.1 Delta Debugging and Program Reduction
Delta debugging established a general approach to simplifying test cases through queries that test a designated property [42]. Subsequent work improves reduction through richer representations and transformations. HDD applies reduction to hierarchical input structures [25], while Perses uses a language grammar to retain syntactic validity during simplification [32]. C-Reduce combines transformations specialized for C/C++, including simplification of declarations and expressions [27]. Vulcan alternates a main reducer with transformations derived from the language grammar, including identifier and subtree replacement [39]. These transformations can preserve the tested property without immediately reducing program size, enabling the main reducer to continue beyond a local minimum. SFC converts between grammatical forms to expose additional simplifications [38], and Latra provides matching and rewriting templates for expressing transformations tailored to a language [40]. These approaches expand the changes an engine can consider while leaving acceptance to its property checker.
Li et al.
The cost of queries has also motivated improvements in candidate selection and reuse of test outcomes. ProbDD estimates which elements need to remain and updates its estimates from previous test results to guide subsequent deletions [35]. WDD assigns each removable fragment a weight equal to its token count, giving a large function more weight than a short declaration [44]. It uses these weights to form partitions containing similar amounts of code or to select deletions that maximize the expected number of tokens removed. CDD simplifies the scheduling behavior underlying ProbDD after identifying the importance of avoiding unproductive queries [43]. RCC stores tested candidates in a compact representation so their results can be reused [33]. It also discards entries for candidates that cannot recur after further deletions, reducing the memory needed for caching.
HarnessMinimizer integrates existing reduction engines with an interestingness test designed for library fuzzing harnesses. The engines propose source transformations, while HarnessMinimizer tests the resulting candidates against the reference crash and preserves recorded input values. Its optimizations lower the cost of queries and complement improvements in transformations, candidate selection, and caching.
7.2 Crash Triage and Crash Preservation
Crash comparison is needed both to group reports of the same bug and to decide whether a reduction candidate preserves the crash under investigation. FaST compares stack traces by matching functions and using their positions and frequency across reports to score similarity [29]. Its comparison time grows in proportion to the total number of frames in the two traces. FuzzerAid uses program reduction to obtain executable evidence for crash grouping [10]. It collects the execution trace of a crashing input, constructs an executable program from the corresponding source code, and applies C-Reduce to obtain a small fault signature that retains the crash location and symptoms. Other crashing inputs are executed on this signature and grouped when they reproduce the same bug type, source location, and call stack. Its reduction process therefore depends on checking that the simplified program continues to expose the crash being investigated.
Reducing the code that must be inspected is also part of diagnosing crashes in generated harnesses. Arash checks for API misuse and selects source statements relevant to the parameters involved in a crash before supplying them to an LLM [36]. This focuses the analysis on arguments and operations that may explain the crash. FuzzAgent first minimizes the harness, then combines crash reproduction, source inspection, and debugging to distinguish library bugs from API misuse [22]. HarnessMinimizer automatically removes irrelevant code from a library fuzzing harness while preserving the original crash. It embeds the input values in the resulting reproducer to help developers and LLMs inspect the calls and arguments involved in the crash.
Producing this reproducer requires comparing the crash from each candidate with the reference crash throughout minimization. A comparison based on function names and source locations first requires symbolization, which translates instruction addresses using the binaries' symbols and debug information. Repeating this step for each crashing candidate adds to reduction time even when the trace comparison itself is fast. HarnessMinimizer instead uses a normalized crash pattern together with a library-relative offset, or unsymbolized stack depth when a shared-library frame is unavailable, to filter candidates during reduction (subsection 3.3).
8 Conclusion
We presented HarnessMinimizer to make automatic reduction of library fuzzing harnesses faster and the resulting reproducers easier to inspect. Its speedups across four engines show that reusing preparation and reducing diagnostic work can benefit different reduction strategies. Input replay enables more extensive simplification by allowing removal of operations retained only
Efficient Program Reduction for Library Fuzzing Harnesses Conference acronym 'XX, June 03–05, 2018, Woodstock, NY
to preserve consumption order. The improved identification of harness bugs in the LLM triage study shows that smaller reproducers with explicit input values can also aid crash triage. These findings support using efficient harness minimization between crash discovery and triage to help investigate library defects and harness misuse.
Tool Availability
HarnessMinimizer is publicly available at https://github.com/FuzzAnything/HarnessMinimizer.
References
[1] 2026. C++: Template instantiation and specialization. https://eel.is/c++draft/temp.explicit
[2] Nader Al Awar, Zijian Yi, George Biros, and Milos Gligoric. 2025. Speeding up the Local C++ Development Cycle with Header Substitution. In Proceedings of the 23rd ACM/IEEE International Symposium on Code Generation and Optimization (CGO '25). Association for Computing Machinery, New York, NY, USA, 704–717. doi:10.1145/3696443.3708942
[3] Brian Langston Barrett. 2025. treereduce. https://github.com/langston-barrett/treereduce/releases/tag/v0.4.1 Accessed: 2026-10-02.
[4] Peng Chen, Yuxuan Xie, Yunlong Lyu, Yuxiao Wang, and Hao Chen. 2023. Hopper: Interpretative Fuzzing for Libraries. In Proceedings of the 2023 ACM SIGSAC Conference on Computer and Communications Security (CCS '23). Association for Computing Machinery, New York, NY, USA, 1600–1614. doi:10.1145/3576915.3616610
[5] FFmpeg. 2026. FFmpeg: tools/target_dec_fuzzer.c. https://github.com/FFmpeg/FFmpeg/blob/master/tools/target_dec_fuzzer.c Accessed: 2026-10-02.
[6] GLM-5-Team, :, Aohan Zeng, Xin Lv, Zhenyu Hou, Zhengxiao Du, Qinkai Zheng, Bin Chen, Da Yin, Chendi Ge, Chenghua Huang, Chengxing Xie, Chenzheng Zhu, Congfeng Yin, Cunxiang Wang, Gengzheng Pan, Hao Zeng, Haoke Zhang, Haoran Wang, Huilong Chen, Jiajie Zhang, Jian Jiao, Jiaqi Guo, Jingsen Wang, Jingzhao Du, Jinzhu Wu, Kedong Wang, Lei Li, Lin Fan, Lucen Zhong, Mingdao Liu, Mingming Zhao, Pengfan Du, Qian Dong, Rui Lu, Shuang-Li, Shulin Cao, Song Liu, Ting Jiang, Xiaodong Chen, Xiaohan Zhang, Xuancheng Huang, Xuezhen Dong, Yabo Xu, Yao Wei, Yifan An, Yilin Niu, Yitong Zhu, Yuanhao Wen, Yukuo Cen, Yushi Bai, Zhongpei Qiao, Zihan Wang, Zikang Wang, Zilin Zhu, Ziqiang Liu, Zixuan Li, Bojie Wang, Bosi Wen, Can Huang, Changpeng Cai, Chao Yu, Chen Li, Chengwei Hu, Chenhui Zhang, Dan Zhang, Daoyan Lin, Dayong Yang, Di Wang, Ding Ai, Erle Zhu, Fangzhou Yi, Feiyu Chen, Guohong Wen, Hailong Sun, Haisha Zhao, Haiyi Hu, Hanchen Zhang, Hanrui Liu, Hanyu Zhang, Hao Peng, Hao Tai, Haobo Zhang, He Liu, Hongwei Wang, Hongxi Yan, Hongyu Ge, Huan Liu, Huanpeng Chu, Jia'ni Zhao, Jiachen Wang, Jiajing Zhao, Jiamin Ren, Jiapeng Wang, Jiaxin Zhang, Jiayi Gui, Jiayue Zhao, Jijie Li, Jing An, Jing Li, Jingwei Yuan, Jinhua Du, Jinxin Liu, Junkai Zhi, Junwen Duan, Kaiyue Zhou, Kangjian Wei, Ke Wang, Keyun Luo, Laiqiang Zhang, Leigang Sha, Liang Xu, Lindong Wu, Lintao Ding, Lu Chen, Minghao Li, Nianyi Lin, Pan Ta, Qiang Zou, Rongjun Song, Ruiqi Yang, Shangqing Tu, Shangtong Yang, Shaoxiang Wu, Shengyan Zhang, Shijie Li, Shuang Li, Shuyi Fan, Wei Qin, Wei Tian, Weining Zhang, Wenbo Yu, Wenjie Liang, Xiang Kuang, Xiangmeng Cheng, Xiangyang Li, Xiaoquan Yan, Xiaowei Hu, Xiaoying Ling, Xing Fan, Xingye Xia, Xinyuan Zhang, Xinze Zhang, Xirui Pan, Xu Zou, Xunkai Zhang, Yadi Liu, Yandong Wu, Yanfu Li, Yidong Wang, Yifan Zhu, Yijun Tan, Yilin Zhou, Yiming Pan, Ying Zhang, Yinpei Su, Yipeng Geng, Yong Yan, Yonglin Tan, Yuean Bi, Yuhan Shen, Yuhao Yang, Yujiang Li, Yunan Liu, Yunqing Wang, Yuntao Li, Yurong Wu, Yutao Zhang, Yuxi Duan, Yuxuan Zhang, Zezhen Liu, Zhengtao Jiang, Zhenhe Yan, Zheyu Zhang, Zhixiang Wei, Zhuo Chen, Zhuoer Feng, Zijun Yao, Ziwei Chai, Ziyuan Wang, Zuzhou Zhang, Bin Xu, Minlie Huang, Hongning Wang, Juanzi Li, Yuxiao Dong, and Jie Tang. 2026. GLM-5: from Vibe Coding to Agentic Engineering. arXiv:2602.15763 [cs.LG] https://arxiv.org/abs/2602.15763
[7] GNOME. 2025. libxml2: fuzz/api.c. https://github.com/GNOME/libxml2/blob/master/fuzz/api.c Accessed: 2026-10-02.
[8] GNU Project. [n. d.]. GNU ld: Command-Line Options. https://sourceware.org/binutils/docs/ld/Options.html Accessed: 2026-10-02.
[9] Harrison Green and Thanassis Avgerinos. 2022. GraphFuzz: library API fuzzing with lifetime-aware dataflow graphs. In Proceedings of the 44th International Conference on Software Engineering (ICSE '22). Association for Computing Machinery, New York, NY, USA, 1070–1081. doi:10.1145/3510003.3510228
[10] Ashwin Kallingal Joshy and Wei Le. 2023. FuzzerAid: Grouping Fuzzed Crashes Based On Fault Signatures. In Proceedings of the 37th IEEE/ACM International Conference on Automated Software Engineering (ASE '22). Association for Computing Machinery, New York, NY, USA, Article 44, 12 pages. doi:10.1145/3551349.3556959
[11] Ao Li, Madonna Huang, Vasudev Vikram, Caroline Lemieux, and Rohan Padhye. 2025. The Havoc Paradox in Generator-Based Fuzzing. ACM Trans. Softw. Eng. Methodol. 35, 1, Article 29 (2025), 26 pages. doi:10.1145/3742894
[12] libjxl. 2026. libjxl: tools/djxl_fuzzer.cc. https://github.com/libjxl/libjxl/blob/main/tools/djxl_fuzzer.cc Accessed: 2026-10-02.
Li et al.
[13] Linux man-pages project. [n.d.]. dlopen(3): Open and Close a Shared Object. https://man7.org/linux/man-pages/man3/dlopen.3.html Accessed: 2026-10-02.
[14] Linux man-pages project. [n.d.]. fork(2): Create a Child Process. https://man7.org/linux/man-pages/man2/fork.2.html Accessed: 2026-10-02.
[15] Yuwei Liu, Junquan Deng, Xiangkun Jia, Yanhao Wang, Minghua Wang, Lin Huang, Tao Wei, and Purui Su. 2025. PromeFuzz: A Knowledge-Driven Approach to Fuzzing Harness Generation with Large Language Models. In Proceedings of the 2025 ACM SIGSAC Conference on Computer and Communications Security (CCS '25). Association for Computing Machinery, New York, NY, USA, 1559–1573. doi:10.1145/3719027.3765222
[16] LLVM Project. [n.d.]. AddressSanitizer. https://clang.llvm.org/docs/AddressSanitizer.html Accessed: 2026-10-02.
[17] LLVM Project. [n.d.]. libFuzzer: A Library for Coverage-Guided Fuzz Testing. https://llvm.org/docs/LibFuzzer.html Accessed: 2026-10-02.
[18] LLVM Project. [n.d.]. llvm-symbolizer: Convert Addresses into Source Code Locations. https://llvm.org/docs/CommandGuide/llvm-symbolizer.html Accessed: 2026-10-02.
[19] LLVM Project. [n.d.]. Precompiled Header and Modules Internals. https://clang.llvm.org/docs/PCHInternals.html Accessed: 2026-10-02.
[20] LLVM Project. [n.d.]. UndefinedBehaviorSanitizer. https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html Accessed: 2026-10-02.
[21] LLVM Project. 2019. FuzzedDataProvider. https://github.com/llvm/llvm-project/blob/main/compiler-rt/include/fuzzer/FuzzedDataProvider.h Accessed: 2026-10-02.
[22] Yunlong Lyu, Peng Chen, Fengyi Wu, Junzhe Yu, Kit Long Hon, and Hao Chen. 2026. FuzzAgent: Multi-Agent System for Evolutionary Library Fuzzing. arXiv:2605.14431 [cs.SE]
[23] Yunlong Lyu, Yuxuan Xie, Peng Chen, and Hao Chen. 2024. Prompt Fuzzing for Fuzz Driver Generation. In Proceedings of the 2024 on ACM SIGSAC Conference on Computer and Communications Security (CCS '24). Association for Computing Machinery, New York, NY, USA, 3793–3807. doi:10.1145/3658644.3670396
[24] Valentin J.M. Manès, HyungSeok Han, Choongwoo Han, Sang Kil Cha, Manuel Egele, Edward J. Schwartz, and Maverick Woo. 2021. The Art, Science, and Engineering of Fuzzing: A Survey. IEEE Transactions on Software Engineering 47, 11 (2021), 2312–2331. doi:10.1109/TSE.2019.2946563
[25] Ghassan Misherghi and Zhendong Su. 2006. HDD: hierarchical delta debugging. In Proceedings of the 28th International Conference on Software Engineering (ICSE '06). Association for Computing Machinery, New York, NY, USA, 142–151. doi:10.1145/1134285.1134307
[26] Vreda Pieterse and David W. Flater. 2014. The ghost in the machine: Don’t let it haunt your software performance measurements. doi:10.6028/NIST.TN.1830
[27] John Regehr, Yang Chen, Pascal Cuoq, Eric Eide, Chucky Ellison, and Xuejun Yang. 2012. Test-case reduction for C compiler bugs. In Proceedings of the 33rd ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI '12). Association for Computing Machinery, New York, NY, USA, 335–346. doi:10.1145/2254064.2254104
[28] Luyao Ren, Xing Zhang, Ziyue Hua, Yanyan Jiang, Xiao He, Yingfei Xiong, and Tao Xie. 2025. Validity-Preserving Delta Debugging via Generator Trace Reduction. ACM Trans. Softw. Eng. Methodol. 34, 3, Article 65 (2025), 33 pages. doi:10.1145/3705305
[29] Irving Muller Rodrigues, Daniel Aloise, and Eraldo Rezende Fernandes. 2022. FaST: a linear time stack trace alignment heuristic for crash report deduplication. In Proceedings of the 19th International Conference on Mining Software Repositories (MSR '22). Association for Computing Machinery, New York, NY, USA, 549–560. doi:10.1145/3524842.3527951
[30] Kostya Serebryany. 2017. OSS-Fuzz-Google’s continuous fuzzing service for open source software. In Proceedings of the 26th USENIX Conference on Security Symposium (technical sessions). USENIX Association.
[31] Konstantin Serebryany, Derek Bruening, Alexander Potapenko, and Dmitriy Vyukov. 2012. AddressSanitizer: A Fast Address Sanity Checker. In 2012 USENIX Annual Technical Conference (USENIX ATC 12). USENIX Association, Boston, MA, 309–318. https://www.usenix.org/conference/atc12/technical-sessions/presentation/serebryany
[32] Chengnian Sun, Yuanbo Li, Qirun Zhang, Tianxiao Gu, and Zhendong Su. 2018. Perses: syntax-guided program reduction. In Proceedings of the 40th International Conference on Software Engineering (ICSE '18). Association for Computing Machinery, New York, NY, USA, 361–371. doi:10.1145/3180155.3180236
[33] Yongqiang Tian, Xueyan Zhang, Yiwen Dong, Zhenyang Xu, Mengxiao Zhang, Yu Jiang, Shing-Chi Cheung, and Chengnian Sun. 2023. On the Caching Schemes to Speed Up Program Reduction. ACM Trans. Softw. Eng. Methodol. 33, 1, Article 17 (2023), 30 pages. doi:10.1145/3617172
[34] tree sitter. 2024. C++ grammar for tree-sitter. https://github.com/tree-sitter/tree-sitter-cpp Accessed: 2026-10-02.
[35] Guancheng Wang, Ruobing Shen, Junjie Chen, Yingfei Xiong, and Lu Zhang. 2021. Probabilistic Delta debugging. In Proceedings of the 29th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering (ESEC/FSE 2021). Association for Computing Machinery, New York, NY, USA,
Efficient Program Reduction for Library Fuzzing Harnesses Conference acronym 'XX, June 03–05, 2018, Woodstock, NY
881–892. doi:10.1145/3468264.3468625
[36] Maoyi Xie, Kaixuan Li, Jingquan Ge, Wei Ma, Yuqiang Sun, Ziqiao Kong, Cen Zhang, Dongge Liu, Oliver Chang, and Yang Liu. 2026. Arash: Token-Efficient LLM-Assisted Crash Root Cause Analysis in Fuzz Driver Generation. ACM Trans. Softw. Eng. Methodol. (2026). doi:10.1145/3811034
[37] Hanxiang Xu, Wei Ma, Ting Zhou, Yanjie Zhao, Kai Chen, Qiang Hu, Yang Liu, and Haoyu Wang. 2025. CKGFuzzer: LLM-Based Fuzz Driver Generation Enhanced By Code Knowledge Graph. In 2025 IEEE/ACM 47th International Conference on Software Engineering: Companion Proceedings (ICSE-Companion). 243–254. doi:10.1109/ICSE-Companion66252.2025.00079
[38] Zhenyang Xu, Yongqiang Tian, Mengxiao Zhang, and Chengnian Sun. 2025. Boosting Program Reduction with the Missing Piece of Syntax-Guided Transformations. Proc. ACM Program. Lang. 9, OOPSLA2, Article 275 (2025), 27 pages. doi:10.1145/3763053
[39] Zhenyang Xu, Yongqiang Tian, Mengxiao Zhang, Gaosen Zhao, Yu Jiang, and Chengnian Sun. 2023. Pushing the Limit of 1-Minimality of Language-Agnostic Program Reduction. Proc. ACM Program. Lang. 7, OOPSLA1, Article 97 (2023), 29 pages. doi:10.1145/3586049
[40] Zhenyang Xu, Yiran Wang, Yongqiang Tian, Mengxiao Zhang, and Chengnian Sun. 2025. Latra: A Template-Based Language-Agnostic Transformation Framework for Effective Program Reduction. In 2025 40th IEEE/ACM International Conference on Automated Software Engineering (ASE). 2274–2285. doi:10.1109/ASE63991.2025.00188
[41] Andreas Zeller and Ralf Hildebrandt. 2002. Simplifying and Isolating Failure-Inducing Input. IEEE Trans. Softw. Eng. 28, 2 (Feb. 2002), 183–200. doi:10.1109/32.988498
[42] Andreas Zeller and Ralf Hildebrandt. 2002. Simplifying and isolating failure-inducing input. IEEE Transactions on Software Engineering 28, 2 (2002), 183–200. doi:10.1109/32.988498
[43] Mengxiao Zhang, Zhenyang Xu, Yongqiang Tian, Xinru Cheng, and Chengnian Sun. 2025. Toward a Better Understanding of Probabilistic Delta Debugging. In 2025 IEEE/ACM 47th International Conference on Software Engineering (ICSE). 2024–2035. doi:10.1109/ICSE55347.2025.00117
[44] Xintong Zhou, Zhenyang Xu, Mengxiao Zhang, Yongqiang Tian, and Chengnian Sun. 2025. WDD: Weighted Delta Debugging. In 2025 IEEE/ACM 47th International Conference on Software Engineering (ICSE). 1592–1603. doi:10.1109/ICSE55347.2025.00071