luau/fuzz/format.cpp
vegorov-rbx 1212fdacbf
Sync to upstream/release/570 (#885)
Once again, all of our changes this week are for new type solver and the
JIT.

In the new type solver, we fixed cyclic type alias handling and multiple
stability issues.

In the JIT, our main progress was for arm64, where, after lowering 36%
of instructions, we start seeing first Luau functions executing
natively.
For x64, we performed code cleanup and refactoring to allow for future
optimizations.
2023-03-31 11:42:49 -07:00

21 lines
558 B
C++

// This file is part of the Luau programming language and is licensed under MIT License; see LICENSE.txt for details
#include "Luau/Common.h"
#include <stddef.h>
#include <stdint.h>
#include <vector>
namespace Luau
{
void fuzzFormatString(const char* data, size_t size);
} // namespace Luau
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* Data, size_t Size)
{
// copy data to heap to make sure ASAN can catch out of bounds access
std::vector<char> str(Data, Data + Size);
Luau::fuzzFormatString(str.data(), str.size());
return 0;
}