DoneJS version of QuickJS
Find a file
Renáta Hodován 01454caf78
OSS-Fuzz targets improvements (#267)
* 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
2024-05-08 18:19:48 +02:00
.github/workflows Add CI targets, fix test_std.js (#247) 2024-03-03 21:57:38 +01:00
doc Strip trailing spaces 2024-02-10 16:19:17 +01:00
examples Strip trailing spaces 2024-02-10 16:19:17 +01:00
fuzz OSS-Fuzz targets improvements (#267) 2024-05-08 18:19:48 +02:00
tests Improve class parser (#289) 2024-05-05 19:54:47 +02:00
.gitignore Add benchmarks target 2024-02-19 01:13:07 +01:00
Changelog update Changelog 2024-01-19 10:18:32 +01:00
cutils.c Prevent UB on memcpy and floating point conversions 2024-03-03 14:05:40 +01:00
cutils.h Improve Date.parse, small fixes 2024-03-22 00:47:17 +01:00
libbf.c Fix compilation with -DCONFIG_BIGNUM 2024-03-22 11:23:33 +01:00
libbf.h Strip trailing spaces 2024-02-10 16:19:17 +01:00
libregexp-opcode.h Strip trailing spaces 2024-02-10 16:19:17 +01:00
libregexp.c Improve libunicode and libregexp headers (#288) 2024-05-05 17:47:40 +02:00
libregexp.h Improve libunicode and libregexp headers (#288) 2024-05-05 17:47:40 +02:00
libunicode-table.h Improve unicode table handling (#286) 2024-05-05 12:10:24 +02:00
libunicode.c Improve libunicode and libregexp headers (#288) 2024-05-05 17:47:40 +02:00
libunicode.h Improve libunicode and libregexp headers (#288) 2024-05-05 17:47:40 +02:00
LICENSE Strip trailing spaces 2024-02-10 16:19:17 +01:00
list.h Strip trailing spaces 2024-02-10 16:19:17 +01:00
Makefile OSS-Fuzz targets improvements (#267) 2024-05-08 18:19:48 +02:00
qjs.c FreeBSD QuickJS Patch (#203) 2024-02-12 11:28:00 +01:00
qjsc.c Strip trailing spaces 2024-02-10 16:19:17 +01:00
qjscalc.js Strip trailing spaces 2024-02-10 16:19:17 +01:00
quickjs-atom.h Strip trailing spaces 2024-02-10 16:19:17 +01:00
quickjs-libc.c Simplify redundant initializers for JS_NewBool() 2024-03-23 09:28:38 +01:00
quickjs-libc.h Strip trailing spaces 2024-02-10 16:19:17 +01:00
quickjs-opcode.h Strip trailing spaces 2024-02-10 16:19:17 +01:00
quickjs.c Improve class parser (#289) 2024-05-05 19:54:47 +02:00
quickjs.h Improve Date.parse, small fixes 2024-03-22 00:47:17 +01:00
readme.txt 2020-01-05 release 2020-09-06 18:53:08 +02:00
release.sh Strip trailing spaces 2024-02-10 16:19:17 +01:00
repl.js Improve repl regexp handling 2024-03-02 14:36:44 +01:00
run-test262.c Improve run-test262 2024-02-18 15:00:04 +01:00
test262.conf Strip trailing spaces 2024-02-10 16:19:17 +01:00
test262_errors.txt fixed JS_GetScriptOrModuleName() in direct or indirect eval code 2024-01-13 11:15:06 +01:00
test262o.conf Fix test262o error 2024-02-10 20:54:29 +01:00
test262o_errors.txt 2020-01-05 release 2020-09-06 18:53:08 +02:00
TODO update test results 2024-01-27 13:12:37 +01:00
unicode_download.sh Strip trailing spaces 2024-02-10 16:19:17 +01:00
unicode_gen.c Improve libunicode and libregexp headers (#288) 2024-05-05 17:47:40 +02:00
unicode_gen_def.h updated to unicode 15.0.0 2023-12-05 16:51:16 +01:00
VERSION Improve string concatenation hack 2024-02-15 10:30:04 +01:00

The main documentation is in doc/quickjs.pdf or doc/quickjs.html.