Open thealberto opened 10 months ago
How about the following?
void ConvertWOFF2ToTTF(const std::vector<std::uint8_t>& bytes) {
const uint8_t* const data{bytes.data()};
const int size{static_cast<int>(bytes.size())};
// ...
}
FUZZ_TEST(AlbertoFuzzTest, ConvertWOFF2ToTTF);
@racko
Thanks it worked!
INFO: Found 1 target...
Target //:alberto up-to-date:
bazel-bin/alberto
INFO: Elapsed time: 3.321s, Critical Path: 3.27s
INFO: 3 processes: 1 internal, 2 linux-sandbox.
INFO: Build completed successfully, 3 total actions
INFO: Running command line: external/bazel_tools/tools/test/test-setup.sh ./alberto '--fuzz=AlbertoFuzzTest.ConvertWOFF2ToTTF'
exec ${PAGER:-/usr/bin/less} "$0" || exit 1
Executing tests from //:alberto
-----------------------------------------------------------------------------
[.] Sanitizer coverage enabled. Counter map size: 30385, Cmp map size: 262144
Note: Google Test filter = AlbertoFuzzTest.ConvertWOFF2ToTTF
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from AlbertoFuzzTest
[ RUN ] AlbertoFuzzTest.ConvertWOFF2ToTTF
FUZZTEST_PRNG_SEED=tnaxpgtwGcTdechb4cT-MAbJTMn3j09oJQQ1jE_rR5Y
[*] Corpus size: 1 | Edges covered: 152 | Fuzzing time: 342.062us | Total runs: 1.00e+00 | Runs/secs: 2923 | Max stack usage: 2880
[*] Corpus size: 2 | Edges covered: 152 | Fuzzing time: 745.952us | Total runs: 3.00e+00 | Runs/secs: 4021 | Max stack usage: 2880
[*] Corpus size: 3 | Edges covered: 154 | Fuzzing time: 1.85638ms | Total runs: 3.50e+01 | Runs/secs: 18853 | Max stack usage: 2880
[*] Corpus size: 4 | Edges covered: 154 | Fuzzing time: 4.787332ms | Total runs: 3.90e+01 | Runs/secs: 8146 | Max stack usage: 2880
[*] Corpus size: 5 | Edges covered: 154 | Fuzzing time: 6.88421ms | Total runs: 4.20e+01 | Runs/secs: 6100 | Max stack usage: 2880
Is it worth to add an example in the docs?
Hi all, I'm trying to port the example
woff2
fuzzer tobazel
. I have prepared the project so I can run simple tests but when I try to mimic the originalLibFuzzer
entry point I get an error.This is the code
This is the output when I run
bazel run --config=fuzztest --copt=-I./include :alberto -- --fuzz=AlbertoFuzzTest.ConvertWOFF2ToTTF
Which type should I use instead? Any other way to fix it?