pitrou opened a new pull request, #51650:
URL: https://github.com/apache/arrow/pull/51650

   ### Rationale for this change
   
   `LLVMFuzzerTestOneInput` allows two return values: 0 and -1. While 0 allows 
for the input to be (potentially) saved in the corpus, -1 tells the fuzzer not 
to save it.
   
   In the words of the [fine 
documentation](https://llvm.org/docs/LibFuzzer.html#rejecting-unwanted-inputs):
   
   > It may be desirable to reject some inputs, i.e. to not add them to the 
corpus.
   > For example, when fuzzing an API consisting of parsing and other logic, 
one may want
   > to allow only those inputs into the corpus that parse successfully.
   > If the fuzz target returns -1 on a given input, libFuzzer will not add that
   > input to the corpus, regardless of what coverage it triggers.
   
   ### What changes are included in this PR?
   
   ### Are these changes tested?
   
   Manually, by running the fuzzer from the command line and watching logs with 
`ARROW_FUZZING_VERBOSITY` enabled.
   
   ### Are there any user-facing changes?
   
   No.
   
   ### Was AI used for this PR?
   
   In accordance to the [AI generation 
guidelines](https://arrow.apache.org/docs/dev/developers/overview.html#ai-generated-code),
 please disclose below whether and how AI was used in this PR.
   
   **PR code and description written by:**
   
   - [x] Human
   - [ ] AI
   
   **Reviewed before submission by:**
   
   - [x] Human
   - [ ] AI
   - [ ] Not reviewed
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to