##// END OF EJS Templates
automation: create Python 3.5 variant of requirements.txt...
automation: create Python 3.5 variant of requirements.txt The automation environment is refusing to build with the previous file because some dependencies won't install on Python 3.5. I couldn't find an easy way to salvage the situation with a single requirements.txt file. So, I decided to introduce a variant for Python 3.5. As part of this, we update packages to latest versions. (I do question why we are still supporting Python 3.5...) Differential Revision: https://phab.mercurial-scm.org/D10690

File last commit:

r44255:7857bd9b default
r47966:546e812a default
Show More
bdiff.cc
39 lines | 969 B | text/x-c | CppLexer
/*
* bdiff.cc - fuzzer harness for bdiff.c
*
* Copyright 2018, Google Inc.
*
* This software may be used and distributed according to the terms of
* the GNU General Public License, incorporated herein by reference.
*/
#include <memory>
#include <stdlib.h>
#include "FuzzedDataProvider.h"
extern "C" {
#include "bdiff.h"
extern "C" int LLVMFuzzerInitialize(int *argc, char ***argv)
{
return 0;
}
int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size)
{
FuzzedDataProvider provider(Data, Size);
std::string left = provider.ConsumeRandomLengthString(Size);
std::string right = provider.ConsumeRemainingBytesAsString();
struct bdiff_line *a, *b;
int an = bdiff_splitlines(left.c_str(), left.size(), &a);
int bn = bdiff_splitlines(right.c_str(), right.size(), &b);
struct bdiff_hunk l;
bdiff_diff(a, an, b, bn, &l);
free(a);
free(b);
bdiff_freehunks(l.next);
return 0; // Non-zero return values are reserved for future use.
}
} // extern "C"