eSpeak NG is an open source speech synthesizer that supports more than hundred languages and accents.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

fuzzing.yml 4.0KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. name: fuzzing
  2. on:
  3. workflow_dispatch:
  4. schedule:
  5. - cron: "0 4 * * 1"
  6. jobs:
  7. build:
  8. runs-on: ubuntu-latest
  9. name: Build synth_espeak on ${{ matrix.arch }}
  10. # Do not run this job on any forked repos
  11. if: github.repository == 'espeak-ng/espeak-ng'
  12. strategy:
  13. fail-fast: false
  14. matrix:
  15. arch: [x86-32, x86-64]
  16. include:
  17. - arch: x86-32
  18. archdeps: "gcc-multilib g++-multilib libpcaudio-dev:i386 libsonic-dev:i386 libc6-dbg:i386"
  19. archconfig: "--host=i686-linux-gnu"
  20. archconfigflags: "-m32"
  21. - arch: x86-64
  22. archdeps: ""
  23. archconfigflags: ''
  24. steps:
  25. - uses: actions/checkout@v3
  26. - name: enable 32bit architecture
  27. run: sudo dpkg --add-architecture i386
  28. if: matrix.arch == 'x86-32'
  29. - name: dependencies
  30. run: sudo apt-get update && sudo apt-get install libpcaudio-dev libsonic-dev ronn kramdown clang llvm ${{ matrix.archdeps }}
  31. - name: autoconf
  32. run: ./autogen.sh ; chmod -x INSTALL m4/*.m4
  33. - name: configure
  34. run: CC="clang ${{ matrix.archconfigflags }}" CXX="clang++ ${{ matrix.archconfigflags }}"
  35. CFLAGS="-fsanitize=address,undefined -fstack-protector-strong -g -Og -fno-omit-frame-pointer"
  36. CXXFLAGS="${{ matrix.archconfigflags }} -fsanitize=address,undefined -fstack-protector-strong -g -Og -fno-omit-frame-pointer"
  37. LDFLAGS="-fsanitize=address,undefined -lubsan"
  38. ./configure ${{ matrix.archconfig }} --with-libfuzzer
  39. - name: Store the fuzzer config
  40. if: ${{ failure() }}
  41. uses: actions/upload-artifact@v3
  42. with:
  43. name: config-${{ matrix.arch }}-${{ matrix.lang }}.log
  44. path: config.log
  45. - name: make
  46. run: make -j
  47. - uses: actions/cache@v3
  48. with:
  49. path: /home/runner/work/espeak-ng/espeak-ng
  50. key: build-${{ matrix.arch }}-${{ github.sha }}
  51. fuzzing:
  52. needs: build
  53. runs-on: ubuntu-latest
  54. name: Fuzz synth_espeak on ${{ matrix.arch }} for ${{ matrix.lang }}
  55. strategy:
  56. fail-fast: false
  57. matrix:
  58. arch: [x86-32, x86-64]
  59. 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]
  60. include:
  61. - arch: x86-32
  62. archdeps: "libpcaudio0:i386 libsonic0:i386 libubsan1:i386 libc6-dbg:i386"
  63. - arch: x86-64
  64. archdeps: ""
  65. steps:
  66. - uses: actions/cache@v3
  67. with:
  68. path: /home/runner/work/espeak-ng/espeak-ng
  69. key: build-${{ matrix.arch }}-${{ github.sha }}
  70. - name: enable 32bit architecture
  71. run: sudo dpkg --add-architecture i386
  72. if: matrix.arch == 'x86-32'
  73. - name: dependencies
  74. run: sudo apt-get update && sudo apt-get install libpcaudio0 libsonic0 libubsan1 ${{ matrix.archdeps }}
  75. - name: Fuzz function synth_espeak()
  76. 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
  77. - name: Store the crash POC
  78. if: ${{ failure() }}
  79. uses: actions/upload-artifact@v3
  80. with:
  81. name: crash-${{ matrix.arch }}-${{ matrix.lang }}.1
  82. path: crash-* timeout-*
  83. - name: Fuzz function synth_espeak() with language-specific input
  84. 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
  85. - name: Store the crash POC
  86. if: ${{ failure() }}
  87. uses: actions/upload-artifact@v3
  88. with:
  89. name: crash-${{ matrix.arch }}-${{ matrix.lang }}.2
  90. path: crash-* timeout-*