csmith
« Back to VersTracker
Description:
Generates random C programs conforming to the C99 standard
Type: Formula  |  Latest Version: 2.3.0@0  |  Tracked Since: Dec 17, 2025
Links: Homepage  |  formulae.brew.sh
Category: Developer tools
Tags: csmith compiler-testing fuzzing c99 random-code-generation
Install: brew install csmith
About:
CSmith is a tool that automatically generates random C programs that are valid according to the C99 standard. It is primarily used for testing compilers and language analysis tools by providing a vast and diverse set of program inputs. The generated code is designed to stress-test compiler edge cases, helping developers find bugs in optimization and code generation.
Key Features:
  • Generates valid C99-compliant random code
  • Highly configurable via command-line options
  • Designed to stress-test compiler frontends and backends
  • Produces code with complex control and data flow
Use Cases:
  • Compiler testing and validation
  • Fuzzing for static analysis tools
  • Discovering edge-case bugs in language toolchains
Alternatives:
  • YARPGen – Another random code generator used for compiler testing, with a different generation strategy.
License: BSD-2-Clause
Bottles available for: arm64_tahoe, arm64_sequoia, arm64_sonoma, arm64_ventura, arm64_monterey, arm64_big_sur, sonoma, ventura, monterey, big_sur, catalina, arm64_linux, x86_64_linux
Important Notes:
It is recommended that you set the environment variable 'CSMITH_PATH' to
  $HOMEBREW_PREFIX/Cellar/csmith/2.3.0/include/csmith-2.3.0
Version History
Detected Version Rev Change Commit
Oct 15, 2025 5:02pm 0 VERSION_BUMP 0f1a3b26
Sep 14, 2025 12:24am 0 VERSION_BUMP 4063b016