update priming instruction in priming.txt #951
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary of Changes:
This pull request includes optimizations made to the priming.txt file, which is used to guide the LLM in generating fuzz targets for the oss-open-fuzz project. The key improvements aim to enhance the efficiency, clarity, and correctness of the fuzz targets generated in the initial run.
Changes Made:
Refined Goal Wording: Updated the fuzz target generation goal to emphasize triggering diverse behaviors rather than focusing on 100% line coverage.
Explicit Input Source: Added clear instructions for deriving all input variables from the fuzzer input (data and size parameters) or FuzzedDataProvider, instead of using hardcoded or random values.
Simplicity Emphasis: Added instructions to simplify the fuzz target logic, focusing on converting input data into valid parameters for the function-under-test.
Error Handling Guidance: Included best practices for handling errors without introducing excessive logic after the function-under-test is called.
Resource Management: Added instructions to ensure that any allocated memory within the fuzz target is properly freed to avoid memory leaks.
Goto Warning: Placed an early warning about avoiding goto statements to prevent common pitfalls in C/C++ fuzz target generation.
Impact:
These changes are expected to improve build success rates, reduce fix attempts, and increase pipeline efficiency by simplifying the fuzz target logic.
The optimizations will enhance the semantic correctness of the fuzz targets and improve code coverage during fuzzing.
Overall, the goal is to create more reliable, efficient, and scalable fuzz targets for testing.