Fix typo: `char` should be `TS`
[compiler-rt] FuzzedDataProvider: Add missing includeDifferential Revision: https://reviews.llvm.org/D98057
[compiler-rt] FuzzedDataProvider: Add PickValueInArray for std::arrayThis makes `PickValueInArray` work for `std::array<T, s>` (C++11). I've also tested the C++17 `std::array` (with compiler-deduce
[compiler-rt] FuzzedDataProvider: Add PickValueInArray for std::arrayThis makes `PickValueInArray` work for `std::array<T, s>` (C++11). I've also tested the C++17 `std::array` (with compiler-deduced template parameters)```Author:MarcoFalke <[email protected]>```Reviewed By: Dor1sDifferential Revision: https://reviews.llvm.org/D93412
show more ...
[compiler-rt] Mark FDP non-template methods inline to avoid ODR violations.
[compiler-rt] FuzzedDataProvider: make linter happy.
[compiler-rt] Refactor FuzzedDataProvider for better readability.Summary: Separate class definition and actual methods implementation. The maingoal is to keep the list of available methods in a co
[compiler-rt] Refactor FuzzedDataProvider for better readability.Summary: Separate class definition and actual methods implementation. The maingoal is to keep the list of available methods in a concise readable form insidethe class definition.Reviewers: hctim, metzmanSubscribers: dberris, #sanitizersTags: #sanitizersDifferential Revision: https://reviews.llvm.org/D76651
[compiler-rt] Add ConsumeRandomLengthString() version without arguments.Reviewers: hctim, metzmanSubscribers: dberris, #sanitizersTags: #sanitizersDifferential Revision: https://reviews.llvm.
[compiler-rt] Add ConsumeRandomLengthString() version without arguments.Reviewers: hctim, metzmanSubscribers: dberris, #sanitizersTags: #sanitizersDifferential Revision: https://reviews.llvm.org/D76448
[compiler-rt] Fix a typo in a comment in FuzzedDataProvider.h.
[compiler-rt] FuzzedDataProvider: add ConsumeData and method.Reviewers: metzmanSubscribers: dberris, #sanitizers, llvm-commitsTags: #sanitizers, #llvmDifferential Revision: https://reviews.ll
[compiler-rt] FuzzedDataProvider: add ConsumeData and method.Reviewers: metzmanSubscribers: dberris, #sanitizers, llvm-commitsTags: #sanitizers, #llvmDifferential Revision: https://reviews.llvm.org/D74359
[compiler-rt] FuzzedDataProvider: do not call memcpy on empty vector.Summary:Some versions of memcpy mark pointer arguments as __nonnull, that triggers UBSanerrors even when the length passed is
[compiler-rt] FuzzedDataProvider: do not call memcpy on empty vector.Summary:Some versions of memcpy mark pointer arguments as __nonnull, that triggers UBSanerrors even when the length passed is 0.Reviewers: manojgupta, metzmanSubscribers: dberris, #sanitizers, llvm-commitsTags: #sanitizers, #llvmDifferential Revision: https://reviews.llvm.org/D71031[compiler-rt] FDP: assert that num_bytes_to_consume == 0 when size == 0.
[compiler-rt] Remove some cpplint filtersllvm-svn: 371704
Update compiler-rt cpplint.pyhttps://github.com/cpplint/cpplint/commit/adb3500107f409ac5491188ae652ac3f4d03d9d3llvm-svn: 371675
[compiler-rt] FuzzedDataProvider: use C++ headers only instead of a C/C++ mix.Reviewers: Dor1sReviewed By: Dor1sSubscribers: dberris, delcypher, #sanitizers, llvm-commitsTags: #llvm, #sanitiz
[compiler-rt] FuzzedDataProvider: use C++ headers only instead of a C/C++ mix.Reviewers: Dor1sReviewed By: Dor1sSubscribers: dberris, delcypher, #sanitizers, llvm-commitsTags: #llvm, #sanitizersDifferential Revision: https://reviews.llvm.org/D66017llvm-svn: 368448
[compiler-rt] Add ConsumeProbability and ConsumeFloatingPoint methods to FDP.Summary:Also slightly cleaned up the comments and changed the header's extensionback to `.h` as per comments on https:
[compiler-rt] Add ConsumeProbability and ConsumeFloatingPoint methods to FDP.Summary:Also slightly cleaned up the comments and changed the header's extensionback to `.h` as per comments on https://reviews.llvm.org/D65812.New methods added:* `ConsumeProbability` returns [0.0, 1.0] by consuming an unsigned integer value from the input data and dividing that value by the integer's max value.* `ConsumeFloatingPointInRange` returns a floating point value in the given range. Relies on `ConsumeProbability` method. This method does not have the limitation of `std::uniform_real_distribution` that requires the given range to be <= the floating point type's max. If the range is too large, this implementation will additionally call `ConsumeBool` to decide whether the result will be in the first or the second half of the range.* `ConsumeFloatingPoint` returns a floating point value in the range `[std::numeric_limits<T>::lowest(), std::numeric_limits<T>::min()]`.Tested on Linux, Mac, Windows.Reviewers: morehouseReviewed By: morehouseSubscribers: kubamracek, mgorny, dberris, delcypher, #sanitizers, llvm-commitsTags: #llvm, #sanitizersDifferential Revision: https://reviews.llvm.org/D65905llvm-svn: 368331
[compiler-rt] Rename FuzzedDataProvider.h to .hpp and other minor changes.Summary:.hpp makes more sense for this header as it's C++ only, plus itcontains the actual implementation.Reviewers: Do
[compiler-rt] Rename FuzzedDataProvider.h to .hpp and other minor changes.Summary:.hpp makes more sense for this header as it's C++ only, plus itcontains the actual implementation.Reviewers: Dor1sReviewed By: Dor1sSubscribers: kubamracek, dberris, mgorny, delcypher, #sanitizers, llvm-commitsTags: #llvm, #sanitizersDifferential Revision: https://reviews.llvm.org/D65812llvm-svn: 368054
[compiler-rt] Move FDP to include/fuzzer/FuzzedDataProvider.h for easier use.Summary:FuzzedDataProvider is a helper class for writing fuzz targets that fuzzmultple inputs simultaneously. The head
[compiler-rt] Move FDP to include/fuzzer/FuzzedDataProvider.h for easier use.Summary:FuzzedDataProvider is a helper class for writing fuzz targets that fuzzmultple inputs simultaneously. The header is supposed to be used for fuzzingengine agnostic fuzz targets (i.e. the same target can be used with libFuzzer,AFL, honggfuzz, and other engines). The common thing though is that fuzz targetsare typically compiled with clang, as it provides all sanitizers as well asdifferent coverage instrumentation modes. Therefore, making this FDP class apart of the compiler-rt installation package would make it easier to developand distribute fuzz targets across different projects, build systems, etc.Some context also available in https://github.com/google/oss-fuzz/pull/2547.This CL does not delete the header from `lib/fuzzer/utils` directory in order toprovide the downstream users some time for a smooth migration to the newheader location.Reviewers: kcc, morehouseReviewed By: morehouseSubscribers: lebedev.ri, kubamracek, dberris, mgorny, delcypher, #sanitizers, llvm-commitsTags: #llvm, #sanitizersDifferential Revision: https://reviews.llvm.org/D65661llvm-svn: 367917