Skip to content

Conversation

@Zac-HD
Copy link
Contributor

@Zac-HD Zac-HD commented Nov 20, 2020

Hypothesis, the property-based testing library, has great support for external fuzzers - while making it easy to develop fuzz harnesses. We can also automatically replay and minimize failing examples found by the fuzzer, which is a lovely debugging workflow 😁

I know that (an old version of) Hypothesis is used internally at Google, and I've been looking forward to this since @inferno-chromium mentioned a Python fuzzer was in the works in google/oss-fuzz#4121. My PhD is about how to upgrade familiar test tools and workflows with the power of fuzzing (among other tricks), and Atheris looks like an awesome upgrade to the Python ecosystem. Thanks for open-sourcing it!

(final note: I haven't fuzzed my example script for long, so Atheris may or may not find ujson bugs if left running)

Hypothesis, the property-based testing library, has great support for external fuzzers.  This makes developing fuzz harnesses easy, and it can automatically replay and minimize failing examples.
@TheShiftedBit TheShiftedBit merged commit 825b906 into google:master Nov 23, 2020
TheShiftedBit added a commit that referenced this pull request Dec 4, 2020
…thon

Using ASan or UBSan breaks Python code coverage and severely harms native code coverage. This can be solved by linking libFuzzer into the Python runtime directly, rather than into Atheris. This change does the following:

1) pip now installs both "atheris" and "atheris_no_libfuzzer". atheris_no_libfuzzer doesn't include libFuzzer in its .so, requiring it to be provided by the Python runtime.

2) Instructions and a script are provided for building CPython 3.8.6 with libFuzzer linked in.

3) pip now installs the version of libFuzzer used when building Atheris to site-packages. The hack used to create this version from outdated libFuzzers is now less hacky and more stable, requiring only one objcopy instead of two. This is used by the script in #2 to build CPython.

4) Debug information is added to alert the user when coverage symbols aren't coming from libFuzzer.

PiperOrigin-RevId: 345675056
Change-Id: I41d5e74ab77079c09f94b9d599d61d687065cbc9
TheShiftedBit added a commit that referenced this pull request Jul 28, 2021
…thon

Using ASan or UBSan breaks Python code coverage and severely harms native code coverage. This can be solved by linking libFuzzer into the Python runtime directly, rather than into Atheris. This change does the following:

1) pip now installs both "atheris" and "atheris_no_libfuzzer". atheris_no_libfuzzer doesn't include libFuzzer in its .so, requiring it to be provided by the Python runtime.

2) Instructions and a script are provided for building CPython 3.8.6 with libFuzzer linked in.

3) pip now installs the version of libFuzzer used when building Atheris to site-packages. The hack used to create this version from outdated libFuzzers is now less hacky and more stable, requiring only one objcopy instead of two. This is used by the script in #2 to build CPython.

4) Debug information is added to alert the user when coverage symbols aren't coming from libFuzzer.

PiperOrigin-RevId: 345675056
Change-Id: I41d5e74ab77079c09f94b9d599d61d687065cbc9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants