Skip to content

Commit

Permalink
fuzz: remove fork-fuzzing scaffolding
Browse files Browse the repository at this point in the history
Fork-fuzzing provides a few pros, but our implementation prevents us
from using fuzzers other than libFuzzer, and may be causing issues such
as coverage-failure builds on OSS-Fuzz. It is not a great long-term
solution as it depends on internal implementation details of libFuzzer
(which is no longer in active development). Remove it in favor of other
methods of resetting state between inputs.

Signed-off-by: Alexander Bulekov <alxndr@bu.edu>
Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
  • Loading branch information
a1xndr committed Feb 17, 2023
1 parent f031c95 commit d2e6f92
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 127 deletions.
4 changes: 0 additions & 4 deletions meson.build
Expand Up @@ -215,10 +215,6 @@ endif
# Specify linker-script with add_project_link_arguments so that it is not placed
# within a linker --start-group/--end-group pair
if get_option('fuzzing')
add_project_link_arguments(['-Wl,-T,',
(meson.current_source_dir() / 'tests/qtest/fuzz/fork_fuzz.ld')],
native: false, language: all_languages)

# Specify a filter to only instrument code that is directly related to
# virtual-devices.
configure_file(output: 'instrumentation-filter',
Expand Down
41 changes: 0 additions & 41 deletions tests/qtest/fuzz/fork_fuzz.c

This file was deleted.

23 changes: 0 additions & 23 deletions tests/qtest/fuzz/fork_fuzz.h

This file was deleted.

56 changes: 0 additions & 56 deletions tests/qtest/fuzz/fork_fuzz.ld

This file was deleted.

6 changes: 3 additions & 3 deletions tests/qtest/fuzz/meson.build
Expand Up @@ -2,7 +2,7 @@ if not get_option('fuzzing')
subdir_done()
endif

specific_fuzz_ss.add(files('fuzz.c', 'fork_fuzz.c', 'qos_fuzz.c',
specific_fuzz_ss.add(files('fuzz.c', 'qos_fuzz.c',
'qtest_wrappers.c'), qos)

# Targets
Expand All @@ -12,7 +12,7 @@ specific_fuzz_ss.add(when: 'CONFIG_VIRTIO_SCSI', if_true: files('virtio_scsi_fuz
specific_fuzz_ss.add(when: 'CONFIG_VIRTIO_BLK', if_true: files('virtio_blk_fuzz.c'))
specific_fuzz_ss.add(files('generic_fuzz.c'))

fork_fuzz = declare_dependency(
fuzz_ld = declare_dependency(
link_args: fuzz_exe_ldflags +
['-Wl,-wrap,qtest_inb',
'-Wl,-wrap,qtest_inw',
Expand All @@ -35,4 +35,4 @@ fork_fuzz = declare_dependency(
'-Wl,-wrap,qtest_memset']
)

specific_fuzz_ss.add(fork_fuzz)
specific_fuzz_ss.add(fuzz_ld)

0 comments on commit d2e6f92

Please sign in to comment.