[PATCH] D63348: [libFuzzer] Improve FuzzedDataProvider helper.

Max Moroz via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 14 11:14:59 PDT 2019


Dor1s created this revision.
Dor1s added reviewers: morehouse, metzman.
Herald added subscribers: Sanitizers, jsji, delcypher.
Herald added projects: LLVM, Sanitizers.

The following changes are made based on the feedback from Tim King:

- Removed default template parameters, to have less assumptions.
- Implemented `ConsumeBytesWithTerminator` method.
- Made `PickValueInArray` method work with `initializer_list` argument.
- Got rid of `data_type` type alias, that was redundant.
- Refactored `ConsumeBytes` logic into a private method for better code reuse.
- Replaced implementation defined unsigned to signed conversion.
- Fixed `ConsumeRandomLengthString` to always call `shrink_to_fit`.
- Clarified and fixed some commments.
- Applied clang-format to both the library and the unittest source.


Repository:
  rCRT Compiler Runtime

https://reviews.llvm.org/D63348

Files:
  lib/fuzzer/tests/FuzzedDataProviderUnittest.cpp
  lib/fuzzer/utils/FuzzedDataProvider.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D63348.204817.patch
Type: text/x-patch
Size: 16488 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190614/0079eb23/attachment.bin>


More information about the llvm-commits mailing list