omega-mv
Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance.
Brought by drakestapleton
omega-mv / om / tls / test / fuzz / oss-fuzz / build.sh
| 1 | #!/bin/bash -eu |
| 2 | # DRAFT (never submitted). OSS-Fuzz / ClusterFuzzLite build: compile each om/tls fuzz target with the pinned |
| 3 | # omc (aarch64, run through qemu-aarch64-static), then one labelled host-tooling libFuzzer driver per target. |
| 4 | # Guide: https://google.github.io/oss-fuzz/getting-started/new-project-guide/ |
| 5 | cd "$SRC/omega-mv" |
| 6 | F=om/tls/test/fuzz |
| 7 | for t in fz_flight fz_hs fz_x509 fz_pem fz_dns fz_http fz_https; do |
| 8 | cat seed/net/http.om seed/net/https.om $F/common.om $F/$t.om > "$WORK/$t.prog.om" |
| 9 | sh om/tls/build.sh "qemu-aarch64-static seed/out/omc" "$WORK/$t.prog.om" "$OUT/$t.om.bin" |
| 10 | $CC $CFLAGS -c $F/oss-fuzz/omexec_fuzzer.c -o "$WORK/omexec.o" |
| 11 | $CXX $CXXFLAGS "$WORK/omexec.o" $LIB_FUZZING_ENGINE -o "$OUT/$t" |
| 12 | case $t in fz_flight|fz_hs|fz_x509) a=fzstore.pem;; fz_pem) a=chain.bin;; *) a=;; esac |
| 13 | [ -n "$a" ] && cp $F/seeds/$a "$OUT/$a" |
| 14 | printf '[libfuzzer]\nmax_len = 65536\n' > "$OUT/$t.options" |
| 15 | [ -n "$a" ] && printf '%s\n' "$OUT/$a" > "$OUT/$t.arg" |
| 16 | (cd $F/seeds/$t && zip -q "$OUT/${t}_seed_corpus.zip" *) |
| 17 | done |