# csmith-project/csmith

Csmith, a random generator of C programs

Repository: https://github.com/csmith-project/csmith
Canonical: https://ross.abutalabs.com/products/csmith
Homepage: http://embed.cs.utah.edu/csmith/
Language: C++
License: NOASSERTION
License Family: other
Last push: 2026-03-02T00:58:43+00:00

## Health v2 (maintenance only)
Score: 64/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 70, release rhythm 35, longevity 100
- inputs: {"age_days": 5601, "days_push": 185, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases, no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1231, forks 170 (observed 2026-08-28T04:04:04.313553+00:00)

## What it is
Csmith is a random generator of C programs whose primary purpose is finding compiler bugs via differential testing. It emits C programs free of undefined behaviors along with statistics about each generated program.

## Use cases
- find bugs in gcc or clang with random C programs
- differential testing of C compilers
- generate a test suite of valid C programs automatically
- stress-test compiler optimizations with random inputs
- generate undefined-behavior-free C code for fuzzing experiments

## When to choose
- you need many random but well-defined C programs for compiler testing
- you want to compare outputs of multiple C compilers to find miscompilations
- you need a corpus of C programs and don't want to write them by hand

## When to avoid
- you need random programs in languages other than C
- you need guaranteed termination - generated programs may contain infinite loops
- you need a general-purpose fuzzer for arbitrary binaries rather than C source generation

## Facets
- artifact type: cli-tool
- maturity: maintenance
- function: testing, fuzzing, data-generation, compiler
- domain: testing, compilers, developer-tools, programming-languages
- platform: windows, cli, cross-platform
- tags: random-program-generation, differential-testing, compiler-bug-finding, c-programs, undefined-behavior-free, linux, macos

## Member repositories
- csmith-project/csmith (main) score 64

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:04.313553+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T08:22:29.480656+00:00, confidence not recorded.
  - readme: https://github.com/csmith-project/csmith (fetched 2026-08-28T04:04:04.313553+00:00, sha 0160b29dd35e)
  - homepage: http://embed.cs.utah.edu/csmith/ (fetched 2026-08-29T12:22:03.380939+00:00, sha ac8745a165ee)
- Data as of 2026-08-30T08:39:29.467469+00:00.
