Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an option to disable instrumenting Rust code for fuzzing #340

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Voker57
Copy link

@Voker57 Voker57 commented May 17, 2023

The reason for this is sometimes I only want to fuzz the specific part of code, and don't want to fuzz the whole Rust crate stack.

@fitzgen
Copy link
Member

fitzgen commented May 17, 2023

I only want to fuzz the specific part of code, and don't want to fuzz the whole Rust crate

This PR would turn off fuzzing instrumentation for all code though, including the "specific part of code" so I don't think this is doing what you say you want to do?

Unfortunately, I don't think there is a good way to do what you describe other than writing your fuzz target such that code you don't want to fuzz is statically unreachabel (i.e. your fuzz target can only exercise the code you want to fuzz).

@Voker57
Copy link
Author

Voker57 commented May 17, 2023

I only want to fuzz the specific part of code, and don't want to fuzz the whole Rust crate

This PR would turn off fuzzing instrumentation for all code though, including the "specific part of code" so I don't think this is doing what you say you want to do?

Unfortunately, I don't think there is a good way to do what you describe other than writing your fuzz target such that code you don't want to fuzz is statically unreachabel (i.e. your fuzz target can only exercise the code you want to fuzz).

The code I'm talking about is already instrumented and linked as a static library. Alternatively, I could manually enable fuzzing for a specific crate, though this might have a better solution.

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.

None yet

2 participants