Browse Source

Separate out fuzzing tests that are known to need some work

master
Samuel Thibault 5 months ago
parent
commit
ba96c5167b

+ 20
- 0
.github/workflows/fuzzing-needswork.yml View File

@@ -0,0 +1,20 @@
name: fuzzing-needswork

on:
workflow_dispatch:
schedule:
- cron: "0 4 * * 1"

jobs:
build:
uses: ./.github/workflows/workflow-for-fuzzing-build.yml

fuzzing-needswork:
needs: build
strategy:
fail-fast: false
matrix:
lang: [af, ar, be, ca, da, es, gn, grc, hi, kl, mr, nl, om, or, pa, pt, ro, shn, si, sv, ta, te, tk, tn, vi]
uses: ./.github/workflows/workflow-for-fuzzing.yml
with:
lang: ${{ matrix.lang }}

+ 6
- 81
.github/workflows/fuzzing.yml View File

@@ -7,89 +7,14 @@ on:

jobs:
build:
runs-on: ubuntu-latest
name: Build synth_espeak on ${{ matrix.arch }}
# Do not run this job on any forked repos
if: github.repository == 'espeak-ng/espeak-ng'
strategy:
fail-fast: false
matrix:
arch: [x86-32, x86-64]
include:
- arch: x86-32
archdeps: "gcc-multilib g++-multilib libpcaudio-dev:i386 libsonic-dev:i386 libc6-dbg:i386"
archconfig: "--host=i686-linux-gnu"
archconfigflags: "-m32"

- arch: x86-64
archdeps: ""
archconfigflags: ''
steps:
- uses: actions/checkout@v4
- name: enable 32bit architecture
run: sudo dpkg --add-architecture i386
if: matrix.arch == 'x86-32'
- name: dependencies
run: sudo apt-get update && sudo apt-get install libpcaudio-dev libsonic-dev ronn kramdown clang llvm ${{ matrix.archdeps }}
- name: autoconf
run: ./autogen.sh ; chmod -x INSTALL m4/*.m4
- name: configure
run: CC="clang ${{ matrix.archconfigflags }}" CXX="clang++ ${{ matrix.archconfigflags }}"
CFLAGS="-fsanitize=address,undefined -fstack-protector-strong -g -Og -fno-omit-frame-pointer"
CXXFLAGS="${{ matrix.archconfigflags }} -fsanitize=address,undefined -fstack-protector-strong -g -Og -fno-omit-frame-pointer"
LDFLAGS="-fsanitize=address,undefined -lubsan"
./configure ${{ matrix.archconfig }} --with-libfuzzer
- name: Store the fuzzer config
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: config-${{ matrix.arch }}-${{ matrix.lang }}.log
path: config.log
- name: make
run: make -j
- uses: actions/cache@v4
with:
path: /home/runner/work/espeak-ng/espeak-ng
key: build-${{ matrix.arch }}-${{ github.sha }}
uses: ./.github/workflows/workflow-for-fuzzing-build.yml

fuzzing:
needs: build
runs-on: ubuntu-latest
name: Fuzz synth_espeak on ${{ matrix.arch }} for ${{ matrix.lang }}
strategy:
fail-fast: false
fail-fast: true
matrix:
arch: [x86-32, x86-64]
lang: [af, am, an, ar, as, az, ba, be, bg, bn, bpy, bs, ca, chr, cmn, cs, cv, cy, da, de, el, en, eo, es, et, eu, fa, fi, fr, ga, gd, gn, grc, gu, hak, haw, he, hi, hr, ht, hu, hy, hyw, ia, id, io, is, it, ja, jbo, ka, kk, kl, kn, ko, kok, ku, ky, la, lb, lfn, lt, ltg, lv, mi, mk, ml, mr, ms, mt, mto, my, nb, nci, ne, nl, nog, om, or, pa, pap, piqd, pl, pt, pt-BR, py, qdb, qu, quc, qya, ro, ru, ru-LV, sd, shn, si, sjn, sk, sl, smj, sq, sr, sv, sw, ta, te, th, tk, tn, tr, tt, ug, uk, ur, uz, vi, yue]
include:
- arch: x86-32
archdeps: "libpcaudio0:i386 libsonic0:i386 libubsan1:i386 libc6-dbg:i386"

- arch: x86-64
archdeps: ""
steps:
- uses: actions/cache@v4
with:
path: /home/runner/work/espeak-ng/espeak-ng
key: build-${{ matrix.arch }}-${{ github.sha }}
- name: enable 32bit architecture
run: sudo dpkg --add-architecture i386
if: matrix.arch == 'x86-32'
- name: dependencies
run: sudo apt-get update && sudo apt-get install libpcaudio0 libsonic0 libubsan1 ${{ matrix.archdeps }}
- name: Fuzz function synth_espeak()
run: mkdir tests/fuzzing/CORPUS_DIR ; FUZZ_VOICE=${{ matrix.lang }} tests/fuzzing/synth_fuzzer.test -seed=1 -runs=10000 -max_len=4096 tests/fuzzing/CORPUS_DIR
- name: Store the crash POC
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: crash-${{ matrix.arch }}-${{ matrix.lang }}.1
path: crash-* timeout-*
- name: Fuzz function synth_espeak() with language-specific input
run: cp dictsource/${{ matrix.lang }}_* tests/fuzzing/CORPUS_DIR/ || true ; FUZZ_VOICE=${{ matrix.lang }} tests/fuzzing/synth_fuzzer.test -seed=1 -runs=10000 -max_len=4096 tests/fuzzing/CORPUS_DIR
- name: Store the crash POC
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: crash-${{ matrix.arch }}-${{ matrix.lang }}.2
path: crash-* timeout-*
lang: [am, an, as, az, ba, bg, bn, bpy, bs, chr, cmn, cs, cv, cy, de, el, en, eo, et, eu, fa, fi, fr, ga, gd, gu, hak, haw, he, hr, ht, hu, hy, hyw, ia, id, io, is, it, ja, jbo, ka, kk, kn, ko, kok, ku, ky, la, lb, lfn, lt, ltg, lv, mi, mk, ml, ms, mt, mto, my, nb, nci, ne, nog, pap, piqd, pl, pt-BR, py, qdb, qu, quc, qya, ru, ru-LV, sd, sjn, sk, sl, smj, sq, sr, sw, th, tr, tt, ug, uk, ur, uz, yue]
uses: ./.github/workflows/workflow-for-fuzzing.yml
with:
lang: ${{ matrix.lang }}

+ 52
- 0
.github/workflows/workflow-for-fuzzing-build.yml View File

@@ -0,0 +1,52 @@
name: workflow-for-fuzzing-build

on:
workflow_call:

jobs:
build:
runs-on: ubuntu-latest
name: Build synth_espeak on ${{ matrix.arch }}
# Do not run this job on any forked repos
if: github.repository == 'espeak-ng/espeak-ng'
strategy:
fail-fast: false
matrix:
arch: [x86-32, x86-64]
include:
- arch: x86-32
archdeps: "gcc-multilib g++-multilib libpcaudio-dev:i386 libsonic-dev:i386 libc6-dbg:i386"
archconfig: "--host=i686-linux-gnu"
archconfigflags: "-m32"

- arch: x86-64
archdeps: ""
archconfigflags: ''
steps:
- uses: actions/checkout@v4
- name: enable 32bit architecture
run: sudo dpkg --add-architecture i386
if: matrix.arch == 'x86-32'
- name: dependencies
run: sudo apt-get update && sudo apt-get install libpcaudio-dev libsonic-dev ronn kramdown clang llvm ${{ matrix.archdeps }}
- name: autoconf
run: ./autogen.sh ; chmod -x INSTALL m4/*.m4
- name: configure
run: CC="clang ${{ matrix.archconfigflags }}" CXX="clang++ ${{ matrix.archconfigflags }}"
CFLAGS="-fsanitize=address,undefined -fstack-protector-strong -g -Og -fno-omit-frame-pointer"
CXXFLAGS="${{ matrix.archconfigflags }} -fsanitize=address,undefined -fstack-protector-strong -g -Og -fno-omit-frame-pointer"
LDFLAGS="-fsanitize=address,undefined -lubsan"
./configure ${{ matrix.archconfig }} --with-libfuzzer
- name: Store the fuzzer config
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: config-${{ matrix.arch }}.log
path: config.log
- name: make
run: make -j
- uses: actions/cache@v4
with:
path: /home/runner/work/espeak-ng/espeak-ng
key: build-${{ matrix.arch }}-${{ github.sha }}


+ 49
- 0
.github/workflows/workflow-for-fuzzing.yml View File

@@ -0,0 +1,49 @@
name: workflow-for-fuzzing

on:
workflow_call:
inputs:
lang:
required: true
type: string

jobs:
fuzzing:
runs-on: ubuntu-latest
name: Fuzz synth_espeak on ${{ matrix.arch }} for ${{ inputs.lang }}
strategy:
matrix:
arch: [x86-32, x86-64]
include:
- arch: x86-32
archdeps: "libpcaudio0:i386 libsonic0:i386 libubsan1:i386 libc6-dbg:i386"

- arch: x86-64
archdeps: ""
steps:
- uses: actions/cache@v4
with:
path: /home/runner/work/espeak-ng/espeak-ng
key: build-${{ matrix.arch }}-${{ github.sha }}
- name: enable 32bit architecture
run: sudo dpkg --add-architecture i386
if: matrix.arch == 'x86-32'
- name: dependencies
run: sudo apt-get update && sudo apt-get install libpcaudio0 libsonic0 libubsan1 ${{ matrix.archdeps }}
- name: Fuzz function synth_espeak()
run: mkdir tests/fuzzing/CORPUS_DIR ; FUZZ_VOICE=${{ inputs.lang }} tests/fuzzing/synth_fuzzer.test -seed=1 -runs=10000 -max_len=4096 tests/fuzzing/CORPUS_DIR
- name: Store the crash POC
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: crash-${{ matrix.arch }}-${{ inputs.lang }}.1
path: crash-* timeout-*
- name: Fuzz function synth_espeak() with language-specific input
run: cp dictsource/${{ inputs.lang }}_* tests/fuzzing/CORPUS_DIR/ || true ; FUZZ_VOICE=${{ inputs.lang }} tests/fuzzing/synth_fuzzer.test -seed=1 -runs=10000 -max_len=4096 tests/fuzzing/CORPUS_DIR
- name: Store the crash POC
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: crash-${{ matrix.arch }}-${{ inputs.lang }}.2
path: crash-* timeout-*


Loading…
Cancel
Save