diff options
| author | robot-piglet <[email protected]> | 2025-09-09 15:30:53 +0300 |
|---|---|---|
| committer | robot-piglet <[email protected]> | 2025-09-09 15:53:46 +0300 |
| commit | e29eb23da54dc982ac07910531a7c279e605e0e6 (patch) | |
| tree | 3f67b4fa12cb9824139f5f090b5ff09a41a84ad7 | |
| parent | 6814692bfdc6daabeafc25e83b3eb07079b123a1 (diff) | |
Intermediate changes
commit_hash:de9cb5de84a0e74b5ad574b780be05b8d756f1c8
8 files changed, 14 insertions, 14 deletions
diff --git a/contrib/libs/libfuzzer/.yandex_meta/override.nix b/contrib/libs/libfuzzer/.yandex_meta/override.nix index df14def273e..39a56cb01f3 100644 --- a/contrib/libs/libfuzzer/.yandex_meta/override.nix +++ b/contrib/libs/libfuzzer/.yandex_meta/override.nix @@ -1,11 +1,11 @@ pkgs: attrs: with pkgs; with attrs; rec { - version = "20.1.8"; + version = "21.1.0"; src = fetchFromGitHub { owner = "llvm"; repo = "llvm-project"; rev = "llvmorg-${version}"; - hash = "sha256-ysyB/EYxi2qE9fD5x/F2zI4vjn8UDoo1Z9ukiIrjFGw="; + hash = "sha256-4DLEZuhREHMl2t0f1iqvXSRSE5VBMVxd94Tj4m8Yf9s="; }; sourceRoot = "source/compiler-rt"; diff --git a/contrib/libs/libfuzzer/include/fuzzer/FuzzedDataProvider.h b/contrib/libs/libfuzzer/include/fuzzer/FuzzedDataProvider.h index e57b95b6304..33ffa8bc00b 100644 --- a/contrib/libs/libfuzzer/include/fuzzer/FuzzedDataProvider.h +++ b/contrib/libs/libfuzzer/include/fuzzer/FuzzedDataProvider.h @@ -203,7 +203,7 @@ template <typename T> T FuzzedDataProvider::ConsumeIntegral() { // be less than or equal to |max|. template <typename T> T FuzzedDataProvider::ConsumeIntegralInRange(T min, T max) { - static_assert(std::is_integral<T>::value, "An integral type is required."); + static_assert(std::is_integral_v<T>, "An integral type is required."); static_assert(sizeof(T) <= sizeof(uint64_t), "Unsupported integral type."); if (min > max) @@ -271,14 +271,14 @@ T FuzzedDataProvider::ConsumeFloatingPointInRange(T min, T max) { // Returns a floating point number in the range [0.0, 1.0]. If there's no // input data left, always returns 0. template <typename T> T FuzzedDataProvider::ConsumeProbability() { - static_assert(std::is_floating_point<T>::value, + static_assert(std::is_floating_point_v<T>, "A floating point type is required."); // Use different integral types for different floating point types in order // to provide better density of the resulting values. using IntegralType = - typename std::conditional<(sizeof(T) <= sizeof(uint32_t)), uint32_t, - uint64_t>::type; + typename std::conditional_t<(sizeof(T) <= sizeof(uint32_t)), uint32_t, + uint64_t>; T result = static_cast<T>(ConsumeIntegral<IntegralType>()); result /= static_cast<T>(std::numeric_limits<IntegralType>::max()); @@ -294,7 +294,7 @@ inline bool FuzzedDataProvider::ConsumeBool() { // also contain |kMaxValue| aliased to its largest (inclusive) value. Such as: // enum class Foo { SomeValue, OtherValue, kMaxValue = OtherValue }; template <typename T> T FuzzedDataProvider::ConsumeEnum() { - static_assert(std::is_enum<T>::value, "|T| must be an enum type."); + static_assert(std::is_enum_v<T>, "|T| must be an enum type."); return static_cast<T>( ConsumeIntegralInRange<uint32_t>(0, static_cast<uint32_t>(T::kMaxValue))); } @@ -314,7 +314,6 @@ T FuzzedDataProvider::PickValueInArray(const std::array<T, size> &array) { template <typename T> T FuzzedDataProvider::PickValueInArray(std::initializer_list<const T> list) { - // TODO(Dor1s): switch to static_assert once C++14 is allowed. if (!list.size()) abort(); diff --git a/contrib/libs/libfuzzer/lib/fuzzer/FuzzerDataFlowTrace.cpp b/contrib/libs/libfuzzer/lib/fuzzer/FuzzerDataFlowTrace.cpp index 93bf817a857..c9210c78a06 100644 --- a/contrib/libs/libfuzzer/lib/fuzzer/FuzzerDataFlowTrace.cpp +++ b/contrib/libs/libfuzzer/lib/fuzzer/FuzzerDataFlowTrace.cpp @@ -265,8 +265,6 @@ int CollectDataFlow(const std::string &DFTBinary, const std::string &DirPath, // we then request tags in [0,Size/2) and [Size/2, Size), and so on. // Function number => DFT. auto OutPath = DirPlusFile(DirPath, Hash(FileToVector(F.File))); - std::unordered_map<size_t, std::vector<uint8_t>> DFTMap; - std::unordered_set<std::string> Cov; Command Cmd; Cmd.addArgument(DFTBinary); Cmd.addArgument(F.File); diff --git a/contrib/libs/libfuzzer/lib/fuzzer/FuzzerDriver.cpp b/contrib/libs/libfuzzer/lib/fuzzer/FuzzerDriver.cpp index 093cd9e3c30..df74a74d40e 100644 --- a/contrib/libs/libfuzzer/lib/fuzzer/FuzzerDriver.cpp +++ b/contrib/libs/libfuzzer/lib/fuzzer/FuzzerDriver.cpp @@ -24,10 +24,11 @@ #include <chrono> #include <cstdlib> #include <cstring> +#include <fstream> +#include <functional> #include <mutex> #include <string> #include <thread> -#include <fstream> // This function should be present in the libFuzzer so that the client // binary can test for its existence. diff --git a/contrib/libs/libfuzzer/lib/fuzzer/FuzzerIOPosix.cpp b/contrib/libs/libfuzzer/lib/fuzzer/FuzzerIOPosix.cpp index 3700fb098e5..f145dddcbb2 100644 --- a/contrib/libs/libfuzzer/lib/fuzzer/FuzzerIOPosix.cpp +++ b/contrib/libs/libfuzzer/lib/fuzzer/FuzzerIOPosix.cpp @@ -12,6 +12,7 @@ #include "FuzzerExtFunctions.h" #include "FuzzerIO.h" +#include <cerrno> #include <cstdarg> #include <cstdio> #include <dirent.h> diff --git a/contrib/libs/libfuzzer/lib/fuzzer/FuzzerRandom.h b/contrib/libs/libfuzzer/lib/fuzzer/FuzzerRandom.h index ad6c07eb5ef..b12fc21a185 100644 --- a/contrib/libs/libfuzzer/lib/fuzzer/FuzzerRandom.h +++ b/contrib/libs/libfuzzer/lib/fuzzer/FuzzerRandom.h @@ -11,6 +11,7 @@ #ifndef LLVM_FUZZER_RANDOM_H #define LLVM_FUZZER_RANDOM_H +#include <cmath> #include <random> namespace fuzzer { diff --git a/contrib/libs/libfuzzer/lib/fuzzer/afl/ya.make b/contrib/libs/libfuzzer/lib/fuzzer/afl/ya.make index 3931f86761b..971906fa807 100644 --- a/contrib/libs/libfuzzer/lib/fuzzer/afl/ya.make +++ b/contrib/libs/libfuzzer/lib/fuzzer/afl/ya.make @@ -8,7 +8,7 @@ LICENSE_TEXTS(.yandex_meta/licenses.list.txt) SUBSCRIBER(g:cpp-contrib) -VERSION(20.1.8) +VERSION(21.1.0) PEERDIR( contrib/libs/afl/llvm_mode diff --git a/contrib/libs/libfuzzer/ya.make b/contrib/libs/libfuzzer/ya.make index 75e18efe2da..e609fcaf2c6 100644 --- a/contrib/libs/libfuzzer/ya.make +++ b/contrib/libs/libfuzzer/ya.make @@ -12,9 +12,9 @@ LICENSE( LICENSE_TEXTS(.yandex_meta/licenses.list.txt) -VERSION(20.1.8) +VERSION(21.1.0) -ORIGINAL_SOURCE(https://github.com/llvm/llvm-project/archive/llvmorg-20.1.8.tar.gz) +ORIGINAL_SOURCE(https://github.com/llvm/llvm-project/archive/llvmorg-21.1.0.tar.gz) SET(SANITIZER_CFLAGS) |
