Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 315a2fd

Browse filesBrowse files
committed
Instrument test utility functions to increase fuzzer efficiency
Fuzz Introspector was reporting a high percentage of fuzz blockers in the `fuzz_diff` test. This means the fuzzing engine was unable to gain visibility into functions lower in the call stack than the blocking functions, making it less effective at producing interesting input data. This clears a large percentage of the fuzz blockers by adding fuzzer instrumentation to them via the `@atheris.instrument_func` decorator.
1 parent 4e212c6 commit 315a2fd
Copy full SHA for 315a2fd

File tree

1 file changed

+3
-0
lines changed
Filter options

1 file changed

+3
-0
lines changed

‎fuzzing/fuzz-targets/fuzz_diff.py

Copy file name to clipboardExpand all lines: fuzzing/fuzz-targets/fuzz_diff.py
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,19 @@
1717
class BytesProcessAdapter:
1818
"""Allows bytes to be used as process objects returned by subprocess.Popen."""
1919

20+
@atheris.instrument_func
2021
def __init__(self, input_string):
2122
self.stdout = io.BytesIO(input_string)
2223
self.stderr = io.BytesIO()
2324

25+
@atheris.instrument_func
2426
def wait(self):
2527
return 0
2628

2729
poll = wait
2830

2931

32+
@atheris.instrument_func
3033
def TestOneInput(data):
3134
fdp = atheris.FuzzedDataProvider(data)
3235

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.