GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - prosyslab/optimuzz

BranchesTags
Open more actions menu

Latest commit

 

History

640 Commits
640 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
alive2 @ c0f5434
alive2 @ c0f5434
 
 
instrumentation
instrumentation
 
 
scripts
scripts
 
 
src
src
 
 
test
test
 
 
tools
tools
 
 
turbo-tv @ a011a31
turbo-tv @ a011a31
 
 
turbotv-fuzzilli @ beca5ff
turbotv-fuzzilli @ beca5ff
 
 
.gitignore
.gitignore
 
 
.gitmodules
.gitmodules
 
 
.ocamlformat
.ocamlformat
 
 
Dockerfile
Dockerfile
 
 
Makefile
Makefile
 
 
README.md
README.md
 
 
build.sh
build.sh
 
 
dune
dune
 
 
dune-project
dune-project
 
 
optimuzz-white-bg.png
optimuzz-white-bg.png
 
 
optimuzz.install
optimuzz.install
 
 
optimuzz.opam
optimuzz.opam
 
 
turbotv-fuzzilli-requirements.txt
turbotv-fuzzilli-requirements.txt
 
 

Repository files navigation

Optimuzz

Optimuzz

This is an Optimuzz instantiation for LLVM. Optimuzz performs directed fuzzing on LLVM optimizer passes with Alive2 translation validator. Our recent development is available at our website.

We also provide an Optimuzz instantiation with TurboTV for the past bugs of TurboFan.

Installation

Quick Start

We provide Dockerfile which installs the system dependencies and configures the environment variables.

docker build -t . optimuzz
docker run -it optimuzz

# Inside the docker
echo $PWD # /home/user/optimuzz
./build.sh
eval $(opam env) # Optimuzz toolchains are installed under the current opam switch

Environment Variables

  • LLVM_PATH: The LLVM project directory. We use clang/llvm toolchains and libraries to build Optimuzz, Alive2, and other LLVM versions under test.
  • LLVM_BUILDS: LLVM versions under test will be installed under this directory.

Note that we use LLVM 20.1.1.

Build Script

The script build.sh installs the followings:

  • the required OPAM packages
  • LLVM 20 with the OCaml bindings
  • Alive2
  • Optimuzz toolchain (fuzzer and llmutate)

Optimuzz Toolchain

We provide following tools to employ Optimuzz.

  • tools/build.py: instruments and builds LLVM with a target file
  • tools/harvest.py collects unit test cases as seeds from LLVM of the targeted commit
  • tools/targetline.py asks an LLM to infer the target location from an LLVM commit
  • tools/fuzz.py runs our fuzzer.
# Build LLVM with our instrumentation pass
$ tools/build.py commit <commit-sha> <target-file> [--fresh]
$LLVM_BUILDS/llvm-builds/<commit-sha>/build/bin/opt

# Harvest seed files from the LLVM project
# `LLVM_PATH` must be set to extract seeds from the unit test suite
$ tools/harvest.py -o <output-dir>

# Ask LLM to select the target line for a code change of the commit
# You must set `OPENAI_API_KEY` to use OpenAI LLM
$ tools/targetline.py <commit-sha>
{
    "target_file": <target-file>,
    "target_line": <target-line>,
}


# Fuzz the LLVM project with the provided seed files, target file, and target line
# It should be able to find `fuzzer` and `llmutate` binary in the PATH
# <run-dir> specifies the working directory of the fuzzer
$ tools/fuzz.py <llvm-dir> <seed-dir> <target-file> <target-line> -r <run-dir>

[*] Found target: <target-file>:<line>
[*] Running fuzzer
...

In addition, scripts/repro-turbofan.sh 1195650 performs the reproduction experiment for the TurboFan Bug 1195650. You can change the number to one of 1195650 1198705 1199345 1200490 1234764 1234770. The reproduction detail appears in our paper.

About

prosys.kaist.ac.kr/optimuzz/

Resources

Readme
Activity
Custom properties

Stars

16 stars

Watchers

3 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.