Age | Commit message (Collapse) | Author | Files | Lines |
|
Add tests option to allow the user to disable them
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
|
Most users don't want to build the fuzzers, so they shouldn't have to explicitly
disable them via the "fuzzing" option.
Signed-off-by: Michael Hanselmann <public@hansmi.ch>
|
|
TL;DR: Update build system and utility script such invoking
`build-aux/oss-fuzz.sh` is all that's needed to build fuzzers in an OSS-Fuzz
compatible environment.
`.gitlab-ci.yml`: Build three variants of fuzzers: using autoconf as before,
libFuzzer via Clang and using the standalone driver.
`build-aux/oss-fuzz.sh`: Remove compiler-specific code. The fuzzing environment
should control the compiler via `$CC`/`$CXX` along with flags in
`$CFLAGS`/`$CXXFLAGS`. Make code actually build by overriding `b_lundef` default
value, otherwise fuzzing-related symbols would cause linker errors during
compilation. Pass fuzzing engine via option; the default would be to use the
built-in standalone engine.
`meson.build`: Remove all fuzzing-related logic except to detect whether fuzzing
should be enabled at all.
`fuzzing/meson.build`: If fuzzing engine `standalone` is selected the build
behaves as any other C program build. When another fuzzing engine is to be used,
e.g. from `$LIB_FUZZING_ENGINE` in `build-aux/oss-fuzz.sh`, a test program is
compiled and linked to ensure that linking suceeds (in particular whether
a `main` function is provided). Prepare for the addition of more fuzzing
binaries by using a loop. Add OSS-Fuzz configuration file for binaries.
Signed-off-by: Michael Hanselmann <public@hansmi.ch>
|
|
Signed-off-by: Victor Toso <victortoso@redhat.com>
|
|
Compiler's LLVMFuzzerTestOneInput is provided (llvm >= 11.0.0), it'll
use that; otherwise, we build the standalone static library for our
usbredirparserfuzz binary.
There is no `fuzzer/FuzzedDataProvider.h` for windows, so we have it
disabled by default for that host system.
As the overall settings around libFuzzer relies on environment
variables, we add build-aux/oss-fuzz.sh script which is based on
systemd's script [0], hence, I'm keeping the name here.
[0] https://github.com/systemd/systemd/blob/main/tools/oss-fuzz.sh
Signed-off-by: Victor Toso <victortoso@redhat.com>
|
|
As an alternative to autotools. Simple time comparison between
configure+build time:
11.569s ./autogen.sh && make
1.642s meson . _build && ninja -C _build
Note that from cflags defined in autotools, only -fstack-protector was
removed for the windows build, otherwise we get few of the following:
> /usbredir/winbuild/../usbredirparser/usbredirfilter.c:274: undefined reference to `__stack_chk_fail'
Signed-off-by: Victor Toso <victortoso@redhat.com>
|