libreoffice-online/fuzzer
Miklos Vajna 0ef5e740a4 fuzzer, clientsession: fix build
Probably went wrong in commit de985834e2
(wsd: simplify DocumentBroker construction, 2024-04-03).

Also init logging to avoid:

common/Log.cpp:664:16: runtime error: downcast of address 0x6070000005d0 which does not point to an object of type 'GenericLogger'
0x6070000005d0: note: object is of type 'Poco::Logger'

similar to how COOLWSD::innerInitialize() does it.

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: Ic16bb2f070e1f0e12204bcc2fc70303d8c1250c8
2024-05-13 08:29:07 +01:00
..
admin-data
data
httpecho-data
httpresponse-data
Admin.cpp fuzzer, clientsession: fix build 2024-05-13 08:29:07 +01:00
ClientSession.cpp fuzzer, clientsession: fix build 2024-05-13 08:29:07 +01:00
Common.cpp fuzzer, clientsession: fix build 2024-05-13 08:29:07 +01:00
Common.hpp fuzzer, clientsession: fix build 2024-05-13 08:29:07 +01:00
httpecho-fuzz.sh
HttpEcho.cpp fuzzer, clientsession: fix build 2024-05-13 08:29:07 +01:00
HttpResponse.cpp fuzzer, clientsession: fix build 2024-05-13 08:29:07 +01:00
README

These fuzzers are meant to be built and executed inside lode.git's sanitizers
environment (currently enables both asan and ubsan).

online.git can be built the usual way, just the additional `--enable-fuzzers`
flag is needed to build the fuzzers. It is useful to do this in a separate
build tree, since the fuzzers config doesn't produce a `coolwsd` binary.

Run the fuzzers like this:

- Admin:

----
./admin_fuzzer -max_len=16384 fuzzer/admin-data/
----

- ClientSession:

----
./clientsession_fuzzer -max_len=16384 fuzzer/data/
----

- HttpResponse:

----
./httpresponse_fuzzer -max_len=16384 fuzzer/httpresponse-data/
----

- HttpEcho:

----
./httpecho_fuzzer -max_len=16384 fuzzer/httpecho-data/
OR, better:
./fuzzer/httpecho-fuzz.sh
----