Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Roblox
GitHub Repository: Roblox/luau
Path: blob/master/fuzz/compiler.cpp
2723 views
1
// This file is part of the Luau programming language and is licensed under MIT License; see LICENSE.txt for details
2
#include "Luau/Compiler.h"
3
#include "Luau/Common.h"
4
5
#include <string>
6
7
#include <string.h>
8
9
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* Data, size_t Size)
10
{
11
for (Luau::FValue<bool>* flag = Luau::FValue<bool>::list; flag; flag = flag->next)
12
{
13
if (strncmp(flag->name, "Luau", 4) == 0)
14
flag->value = true;
15
}
16
17
Luau::compile(std::string(reinterpret_cast<const char*>(Data), Size));
18
return 0;
19
}
20
21