mirror of
https://github.com/bellard/quickjs.git
synced 2024-11-23 14:18:13 +08:00
01454caf78
* Move fuzz target sources from the oss-fuzz repository here * Add support to build libFuzzer targets * Simplify the fuzz_eval and fuzz_compile targets The use of JS_NewContext instead of JS_NewContextRaw spares to call JS_AddIntrinsic<XYZ> functions from the fuzz target, since the public JS_NewContext API does exactly the same. * Simplify the fuzz_regexp target fuzz_regexp doesn't need to be dependant on libquickjs since the runtime and the context - that were provided by libquickjs - were only created to call two simple functions implemented in libquickjs which could be mimicked by the fuzzer. The removal of runtime and context objects implicated further simplifications, like the omission of their one-time creation. Finally, writing the result of the regexp operations into a file is also superfluous, since it's not used by anybody. * Recreate and destroy JS runtime and context in fuzz_eval and fuzz_compile targets Before this patch, the test executions were not independent, since all the executed tests used the same JavaScript runtime and context, causing irreproducible failure reports. * Enable bignumber support in eval and compile targets Big numbers are used by the input corpus, but the targets were not able to interpret them since they were not compiled into them. This change improved the inital coverage of the fuzz_eval target with 21% and the coverage of the fuzz_compile target with 25% when using the official corpus. * Ensure std and os modules are available in the fuzz_eval and fuzz_compile targets * Add fuzzer dictionary with builtin and variable names. Furthermore, added a JS script that collects all the builtin names from the executing engine. * Move common fuzzer code into one place * Enable to define the LIB_FUZZING_ENGINE variable to ease the oss-fuzz integration * Add README to fuzzers
258 lines
2.4 KiB
Plaintext
258 lines
2.4 KiB
Plaintext
"__loadScript"
|
|
"abs"
|
|
"acos"
|
|
"acosh"
|
|
"add"
|
|
"AggregateError"
|
|
"and"
|
|
"apply"
|
|
"Array"
|
|
"ArrayBuffer"
|
|
"asin"
|
|
"asinh"
|
|
"atan"
|
|
"atan2"
|
|
"atanh"
|
|
"Atomics"
|
|
"BigDecimal"
|
|
"BigFloat"
|
|
"BigFloatEnv"
|
|
"BigInt"
|
|
"BigInt64Array"
|
|
"BigUint64Array"
|
|
"Boolean"
|
|
"cbrt"
|
|
"ceil"
|
|
"chdir"
|
|
"clearTimeout"
|
|
"close"
|
|
"clz32"
|
|
"compareExchange"
|
|
"console"
|
|
"construct"
|
|
"cos"
|
|
"cosh"
|
|
"DataView"
|
|
"Date"
|
|
"decodeURI"
|
|
"decodeURIComponent"
|
|
"defineProperty"
|
|
"deleteProperty"
|
|
"dup"
|
|
"dup2"
|
|
"E"
|
|
"encodeURI"
|
|
"encodeURIComponent"
|
|
"err"
|
|
"Error"
|
|
"escape"
|
|
"eval"
|
|
"EvalError"
|
|
"evalScript"
|
|
"exchange"
|
|
"exec"
|
|
"exit"
|
|
"exp"
|
|
"expm1"
|
|
"fdopen"
|
|
"Float32Array"
|
|
"Float64Array"
|
|
"floor"
|
|
"fround"
|
|
"Function"
|
|
"gc"
|
|
"get"
|
|
"getcwd"
|
|
"getenv"
|
|
"getenviron"
|
|
"getOwnPropertyDescriptor"
|
|
"getpid"
|
|
"getPrototypeOf"
|
|
"globalThis"
|
|
"has"
|
|
"hypot"
|
|
"imul"
|
|
"in"
|
|
"Infinity"
|
|
"Int16Array"
|
|
"Int32Array"
|
|
"Int8Array"
|
|
"InternalError"
|
|
"isatty"
|
|
"isExtensible"
|
|
"isFinite"
|
|
"isLockFree"
|
|
"isNaN"
|
|
"iterateBuiltIns"
|
|
"JSON"
|
|
"kill"
|
|
"length"
|
|
"LN10"
|
|
"LN2"
|
|
"load"
|
|
"loadFile"
|
|
"loadScript"
|
|
"log"
|
|
"log10"
|
|
"LOG10E"
|
|
"log1p"
|
|
"log2"
|
|
"LOG2E"
|
|
"lstat"
|
|
"Map"
|
|
"Math"
|
|
"max"
|
|
"min"
|
|
"mkdir"
|
|
"NaN"
|
|
"notify"
|
|
"now"
|
|
"Number"
|
|
"O_APPEND"
|
|
"O_CREAT"
|
|
"O_EXCL"
|
|
"O_RDONLY"
|
|
"O_RDWR"
|
|
"O_TRUNC"
|
|
"O_WRONLY"
|
|
"Object"
|
|
"open"
|
|
"Operators"
|
|
"or"
|
|
"os"
|
|
"out"
|
|
"ownKeys"
|
|
"parse"
|
|
"parseExtJSON"
|
|
"parseFloat"
|
|
"parseInt"
|
|
"PI"
|
|
"pipe"
|
|
"platform"
|
|
"popen"
|
|
"pow"
|
|
"preventExtensions"
|
|
"print"
|
|
"printf"
|
|
"Promise"
|
|
"Proxy"
|
|
"puts"
|
|
"random"
|
|
"RangeError"
|
|
"read"
|
|
"readdir"
|
|
"readlink"
|
|
"realpath"
|
|
"ReferenceError"
|
|
"Reflect"
|
|
"RegExp"
|
|
"remove"
|
|
"rename"
|
|
"round"
|
|
"S_IFBLK"
|
|
"S_IFCHR"
|
|
"S_IFDIR"
|
|
"S_IFIFO"
|
|
"S_IFLNK"
|
|
"S_IFMT"
|
|
"S_IFREG"
|
|
"S_IFSOCK"
|
|
"S_ISGID"
|
|
"S_ISUID"
|
|
"scriptArgs"
|
|
"seek"
|
|
"SEEK_CUR"
|
|
"SEEK_END"
|
|
"SEEK_SET"
|
|
"set"
|
|
"Set"
|
|
"setenv"
|
|
"setPrototypeOf"
|
|
"setReadHandler"
|
|
"setTimeout"
|
|
"setWriteHandler"
|
|
"SharedArrayBuffer"
|
|
"SIGABRT"
|
|
"SIGALRM"
|
|
"SIGCHLD"
|
|
"SIGCONT"
|
|
"SIGFPE"
|
|
"SIGILL"
|
|
"SIGINT"
|
|
"sign"
|
|
"signal"
|
|
"SIGPIPE"
|
|
"SIGQUIT"
|
|
"SIGSEGV"
|
|
"SIGSTOP"
|
|
"SIGTERM"
|
|
"SIGTSTP"
|
|
"SIGTTIN"
|
|
"SIGTTOU"
|
|
"SIGUSR1"
|
|
"SIGUSR2"
|
|
"sin"
|
|
"sinh"
|
|
"sleep"
|
|
"sleepAsync"
|
|
"sprintf"
|
|
"sqrt"
|
|
"SQRT1_2"
|
|
"SQRT2"
|
|
"stat"
|
|
"std"
|
|
"store"
|
|
"strerror"
|
|
"String"
|
|
"stringify"
|
|
"sub"
|
|
"Symbol"
|
|
"symlink"
|
|
"SyntaxError"
|
|
"tan"
|
|
"tanh"
|
|
"tmpfile"
|
|
"trunc"
|
|
"ttyGetWinSize"
|
|
"ttySetRaw"
|
|
"TypeError"
|
|
"Uint16Array"
|
|
"Uint32Array"
|
|
"Uint8Array"
|
|
"Uint8ClampedArray"
|
|
"undefined"
|
|
"unescape"
|
|
"unsetenv"
|
|
"URIError"
|
|
"urlGet"
|
|
"utimes"
|
|
"wait"
|
|
"waitpid"
|
|
"WeakMap"
|
|
"WeakSet"
|
|
"WNOHANG"
|
|
"Worker"
|
|
"write"
|
|
"xor"
|
|
"v0"
|
|
"v1"
|
|
"v2"
|
|
"v3"
|
|
"v4"
|
|
"v5"
|
|
"v6"
|
|
"v7"
|
|
"v8"
|
|
"v9"
|
|
"v10"
|
|
"v11"
|
|
"v12"
|
|
"v13"
|
|
"v14"
|
|
"v15"
|
|
"v16"
|
|
"v17"
|
|
"v18"
|
|
"v19"
|
|
"v20"
|