mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-25 15:06:14 +01:00
Merge branch 'oss-fuzz-test' into 'main'
fuzzing: Only set the writer function once See merge request GNOME/glib!2638
This commit is contained in:
commit
c53ba685f5
@ -17,6 +17,12 @@ static void
|
||||
fuzz_set_logging_func (void)
|
||||
{
|
||||
#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
|
||||
g_log_set_writer_func (empty_logging_func, NULL, NULL);
|
||||
static gboolean writer_set = FALSE;
|
||||
|
||||
if (!writer_set)
|
||||
{
|
||||
g_log_set_writer_func (empty_logging_func, NULL, NULL);
|
||||
writer_set = TRUE;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -38,4 +38,14 @@ foreach target_name : fuzz_targets
|
||||
c_args : extra_c_args,
|
||||
dependencies : deps,
|
||||
)
|
||||
|
||||
# If the FuzzingEngine isn’t available, build some unit tests to check that
|
||||
# the fuzzing files do basically work. This doesn’t do any actual fuzzing though.
|
||||
# Pass in the README as an arbitrary fuzzing input, just so we have something.
|
||||
if not fuzzing_engine.found()
|
||||
test(target_name, exe,
|
||||
args : files('README.md'),
|
||||
suite : 'fuzzing',
|
||||
)
|
||||
endif
|
||||
endforeach
|
||||
|
Loading…
Reference in New Issue
Block a user