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

Extract most of LLVMFuzzerCustomMutator and LLVMFuzzerTestOneInput into fuzzing_helpers.h #3

Merged
merged 2 commits into from
Jan 13, 2017

Conversation

vitalybuka
Copy link
Collaborator

No description provided.

@vitalybuka vitalybuka requested a review from mikea January 12, 2017 19:29
@@ -0,0 +1,24 @@
language: cpp
Copy link

Choose a reason for hiding this comment

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

pls submit this separately.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done

output->Clear();
TextFormat::Parser parser;
parser.AllowPartialMessage(true);
parser.ParseFromString({data, data + size}, output);
Copy link

Choose a reason for hiding this comment

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

what if it fails? Warning or something is helpful.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'd expect that common practice will be use of copruses generated by other tools.
In this case incompatible are expected.
I believe this warning will likely be a noise than actionable thing.

@@ -15,47 +15,23 @@
#include <cstddef>
#include <cstdint>

#include "google/protobuf/text_format.h"
#include "fuzzing_helpers.h"
Copy link

Choose a reason for hiding this comment

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

let's create examples/ folder

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done

// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef FUZZING_HELPERS_H_
Copy link

Choose a reason for hiding this comment

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

Let's add these 2 functions as high-level api to protobuf_mutator.h and .cc files. We won't need helpers then.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done

@vitalybuka vitalybuka force-pushed the master branch 28 times, most recently from 25a3693 to 71a4836 Compare January 13, 2017 00:27
@vitalybuka vitalybuka force-pushed the master branch 20 times, most recently from 8c1ed44 to 2b1372d Compare January 13, 2017 06:48
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