# Using Nix to Fuzz Test a PDF Parser (Part One)

DevFeed: [Using Nix to Fuzz Test a PDF Parser (Part One)](<https://devfeed.tech/articles/using-nix-to-fuzz-test-a-pdf-parser-part-one-52791.md>)

Original publisher: [Read original article](<https://mtlynch.io/nix-fuzz-testing-1/>)

Author: Michael Lynch

Published: 2024-10-23T00:00:00Z

Content type: tutorial

Language: en

Sources: [mtlynch.io](<https://devfeed.tech/sources/mtlynch-io.md>)

Topics: [Fuzzing/Fuzz testing](<https://devfeed.tech/topics/fuzzing.md>), [Nix](<https://devfeed.tech/topics/nix.md>), [Testing](<https://devfeed.tech/topics/testing.md>), [Parser](<https://devfeed.tech/topics/parser.md>), [configuration](<https://devfeed.tech/topics/configuration.md>), [pdf](<https://devfeed.tech/topics/pdf.md>), [Linux](<https://devfeed.tech/topics/linux.md>), [Git](<https://devfeed.tech/topics/git.md>), [Open Source](<https://devfeed.tech/topics/open-source.md>), [Command-line interface](<https://devfeed.tech/topics/cli.md>)

Tags: [bugs](<https://devfeed.tech/tags/bugs.md>), [configuration](<https://devfeed.tech/tags/configuration.md>), [fuzzing](<https://devfeed.tech/tags/fuzzing.md>), [git](<https://devfeed.tech/tags/git.md>), [input](<https://devfeed.tech/tags/input.md>), [linux](<https://devfeed.tech/tags/linux.md>), [nix](<https://devfeed.tech/tags/nix.md>), [open-source](<https://devfeed.tech/tags/open-source.md>), [terminal](<https://devfeed.tech/tags/terminal.md>), [test](<https://devfeed.tech/tags/test.md>), [testing](<https://devfeed.tech/tags/testing.md>)

## AI overview

A tutorial showing how Nix can simplify fuzz testing by creating a reproducible workflow that builds an instrumented PDF reader, supplies test inputs, and reports crashes from generated PDFs. The author also describes using the workflow to find an unpatched bug.

## Source excerpt

Fuzz testing is a technique for automatically uncovering bugs in software. The problem is that it's a pain to set up. Read any fuzz testing tutorial, and the first task is an hour of building tools from source and chasing down dependencies upon dependencies. I recently found that Nix eliminates a lot of the gruntwork from fuzz testing. I created a Nix configuration that kicks off a fuzz testing workflow with a single command. The only dependencies are Nix and git.