Skip to content

Latest commit

 

History

History
53 lines (36 loc) · 1.64 KB

File metadata and controls

53 lines (36 loc) · 1.64 KB

Installation

Quick Start

The Docker image ships with all prebuilt targets at /targets/. No compilation needed.

docker run -it --cap-add=SYS_PTRACE --security-opt seccomp=unconfined \
    -v $(pwd):/workdir -w /workdir \
    chibinz/crossfit-artifact fish

Building the Image (Optional)

If you need to rebuild the Docker image (e.g., to add new targets):

docker build -t crossfit-artifact -f .devcontainer/Dockerfile .

Rebuilding Targets from Source (Optional)

To rebuild targets (e.g., to modify the LLVM pass or test a different version), use scripts/build.fish inside the container:

# LLVM context-link analysis pass + support library
scripts/build.fish callsite-pass

# Latest versions (callsite instrumentation)
scripts/build.fish callsite php
scripts/build.fish callsite cpython
scripts/build.fish callsite ruby

# Latest versions (AddressSanitizer)
scripts/build.fish asan php
scripts/build.fish asan cpython
scripts/build.fish asan ruby

Building requires interpreter sources in targets/. Clone them if not already present:

git clone https://github.com/php/php-src targets/php --branch php-8.4.0 --depth 1
git clone https://github.com/python/cpython targets/cpython --branch v3.13.0 --depth 1

Troubleshooting

Docker on ARM/Apple Silicon: The image requires linux/amd64. Use docker run --platform linux/amd64 (significantly slower under emulation).

Permission denied errors: Run chown -R $(id -u):$(id -g) /workdir inside the container.

LLVM pass build fails: Verify llvm-config returns version 15. Inside the container it should be at /clang+llvm-15/bin/llvm-config.