Skip to content

Reimplement fuzzing instrumentation using Bazel transitions. - #86

Merged
stefanbucur merged 12 commits into
masterfrom
fuzz-test-rule-provider
Dec 4, 2020
Merged

stefanbucur merged 12 commits into
masterfrom
fuzz-test-rule-provider

Conversation

@stefanbucur

Copy link
Copy Markdown
Collaborator

This approach eliminates the need for inlining the instrumentation options in the bazelrc file and simplifies the adoption of the rules.

This approach eliminates the need for inlining the instrumentation options in the bazelrc file and simplifies the adoption of the rules.

@markus-kusano markus-kusano left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only nits

Comment thread .github/workflows/bazel_test.yml Outdated
- name: Run simple smoke test
run: |
bazel run //examples:empty_fuzz_test_run --config=asan-libfuzzer -- --timeout_secs=5
- name: Run advanced smoke test

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a suggestion (I might be missing context): would it make sense to have a smoke test also for honggfuzz? Also perhaps the reproduction mode for libFuzzer? Maybe MSAN as well?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a great point. I've replaced this set of steps with a separate "Smoke testing" job and enabled a matrix of configuration to test multiple combinations of config x fuzz target.

On this occasion, I discovered that the RE2 example actually triggers an MSAN error :) I will report this on the RE2 project itself and we can decide if we want to include this simple fuzz target as a RE2 fuzzer for OSS-Fuzz too. CC @inferno-chromium @oliverchang

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, feel free to resolve, leaving open for other's to take a look.

Comment thread fuzzing/BUILD Outdated
Comment thread fuzzing/instrum_opts.bzl Outdated
Comment thread fuzzing/instrum_opts.bzl Outdated
Comment thread fuzzing/instrum_opts.bzl Outdated
Comment thread fuzzing/instrum_opts.bzl Outdated
Comment thread fuzzing/private/instrument.bzl

@stefanbucur stefanbucur left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the thorough review! PTAL.

Comment thread .github/workflows/bazel_test.yml Outdated
- name: Run simple smoke test
run: |
bazel run //examples:empty_fuzz_test_run --config=asan-libfuzzer -- --timeout_secs=5
- name: Run advanced smoke test

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a great point. I've replaced this set of steps with a separate "Smoke testing" job and enabled a matrix of configuration to test multiple combinations of config x fuzz target.

On this occasion, I discovered that the RE2 example actually triggers an MSAN error :) I will report this on the RE2 project itself and we can decide if we want to include this simple fuzz target as a RE2 fuzzer for OSS-Fuzz too. CC @inferno-chromium @oliverchang

Comment thread fuzzing/BUILD Outdated
Comment thread fuzzing/instrum_opts.bzl Outdated
Comment thread fuzzing/instrum_opts.bzl Outdated
Comment thread fuzzing/instrum_opts.bzl Outdated
Comment thread fuzzing/instrum_opts.bzl Outdated
Comment thread fuzzing/private/instrument.bzl
@stefanbucur
stefanbucur merged commit e03b32a into master Dec 4, 2020
@stefanbucur
stefanbucur deleted the fuzz-test-rule-provider branch December 4, 2020 05:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants