|
|
пре 5 дана | |
|---|---|---|
| .. | ||
| aot-compiler | пре 6 месеци | |
| wasm-mutator | пре 7 месеци | |
| .env | пре 1 година | |
| .gitignore | пре 1 година | |
| CMakeLists.txt | пре 7 месеци | |
| README.md | пре 1 месец | |
| clang_toolchain.cmake | пре 8 месеци | |
| smith_wasm.sh | пре 5 дана | |
Download the release suitable for your specific platform from https://github.com/bytecodealliance/wasm-tools/releases/latest, unpack it, and add the executable wasm-tools to the PATH. Then, you should be able to verify that the installation was successful by using the following command:
$ wasm-tools --version
# Or learn subcommands with
$ wasm-tools help
Refer to: https://apt.llvm.org/ and ensure that you have clang installed.
$ clang --version
$ clang++ --version
# Without custom mutator (libfuzzer modify the buffer randomly)
$ cmake -S . -B build -DCMAKE_TOOLCHAIN_FILE=./clang_toolchain.cmake -DLLVM_DIR=<llvm_install_dir>/lib/cmake/llvm
# TBC: if `wasm-tools mutate` is supported or not
# Or With custom mutator (wasm-tools mutate)
$ cmake -S . -B build -DCMAKE_TOOLCHAIN_FILE=./clang_toolchain.cmake -DLLVM_DIR=<llvm_install_dir>/lib/cmake/llvm -DCUSTOM_MUTATOR=1
# Then
$ cmake --build build
# wasm-tools smith generate some valid wasm file
# The generated wasm file is in corpus_dir under build
# N - Number of files to be generated
$ ./smith_wasm.sh N
# running
``` bash
$ ./build/wasm-mutator/wasm_mutator_fuzz ./build/CORPUS_DIR
$ ./build/aot-compiler/aot_compiler_fuzz ./build/CORPUS_DIR