MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / fxBuildFuzz

Function fxBuildFuzz

xs/tools/xstFuzz.c:58–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56/* native memory stress */
57
58void fxBuildFuzz(xsMachine* the)
59{
60#if FUZZING
61 xsResult = xsNewHostFunction(fx_fuzz_gc, 0);
62 xsSet(xsGlobal, xsID("gc"), xsResult);
63 xsResult = xsNewHostFunction(fx_fillBuffer, 2);
64 xsSet(xsGlobal, xsID("fillBuffer"), xsResult);
65 xsResult = xsNewHostFunction(fx_fuzz_doMarshall, 1);
66 xsSet(xsGlobal, xsID("doMarshall"), xsResult);
67#if FUZZILLI
68 xsResult = xsNewHostFunction(fx_memoryFail, 1);
69 xsSet(xsGlobal, xsID("memoryFail"), xsResult);
70 xsResult = xsNewHostFunction(fx_fuzzilli, 2);
71 xsSet(xsGlobal, xsID("fuzzilli"), xsResult);
72#endif
73
74 xsResult = xsNewHostFunction(fx_petrify, 1);
75 xsDefine(xsGlobal, xsID("petrify"), xsResult, xsDontEnum);
76 xsResult = xsNewHostFunction(fx_mutabilities, 1);
77 xsDefine(xsGlobal, xsID("mutabilities"), xsResult, xsDontEnum);
78
79 // these are installed by fxBuildAgent
80// modInstallTextDecoder(the);
81// modInstallTextEncoder(the);
82
83 gxStress = 0;
84 gxMemoryFail = 0;
85#endif
86}
87
88#if OSSFUZZ
89int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {

Callers 2

mainFunction · 0.85
fxRunBundleFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected