Commit graph

32 commits

Author SHA1 Message Date
Nick Vatamaniuc
6b3bed1740
Fix stack overflow in CVE-2023-31922 (#157)
isArray and proxy isArray can call each other indefinitely in a mutually
recursive loop.

Add a stack overflow check in the js_proxy_isArray function before calling
`JS_isArray(ctx, s->target)`.

Original issue: https://github.com/bellard/quickjs/issues/178
CVE: https://nvd.nist.gov/vuln/detail/CVE-2023-31922
2023-12-01 16:31:36 +01:00
Saúl Ibarra Corretgé
bfd8c381cb Add support for building with ClangCL on Windows
Since ClangCL is compatible with MSVC this should get us almost there.

Ref: https://clang.llvm.org/docs/MSVCCompatibility.html
2023-11-30 01:23:09 +01:00
Ben Noordhuis
b6b70e471c
Add os.cputime() (#159)
And use it in microbench to get slightly more accurate results.
2023-11-30 00:05:48 +01:00
Ben Noordhuis
5c3077e091
Implement RegExp serialization (#153)
JS_WriteObject() and JS_ReadObject() now support RegExp objects.
2023-11-29 08:50:53 +01:00
Ben Noordhuis
8df335a7b9
Expose class name to static initializers (#139)
Fixes: https://github.com/quickjs-ng/quickjs/issues/138
2023-11-26 01:09:18 +01:00
Saúl Ibarra Corretgé
8d496b3e3c Add queueMicrotask
Ref: https://github.com/quickjs-ng/quickjs/issues/16
2023-11-21 23:43:17 +01:00
Ben Noordhuis
e2bc6441f8
Optimize RegExp ASCII literal matching (#94)
Add REOP_char8 that matches single bytes. Compresses bytecode for the
ASCII common case by 33% and reduces regexp_ascii benchmark running time
by 4%. The regexp_utf16 benchmark is unaffected.
2023-11-19 17:26:45 +01:00
Ben Noordhuis
e49da8e96f
Unbreak microbench, add os.now() (#93)
The removal of the high-precision but non-standard clock source in
commit 5af98ca broke microbench because Date.now() is not granular
enough for the benchmark runner to make forward progress.

This commit adds a new method to the os module that returns time
with microsecond precision.
2023-11-19 17:26:25 +01:00
Ben Noordhuis
5af98ca858
Remove non-standard Date.__date_clock method (#88) 2023-11-18 19:15:05 +01:00
Saúl Ibarra Corretgé
54a4f2907e Refactor build system to use CMake only 2023-11-17 13:10:18 +01:00
Ben Noordhuis
d2e632e77a
Allow symbols as WeakMap and WeakSet keys (#58) 2023-11-16 09:07:59 +01:00
Ben Noordhuis
162a8b7409
Remove trailing whitespace (#46)
Not purely cosmetic because it breaks navigation with { and } in the
One True Editor.
2023-11-12 10:01:40 +01:00
Ben Noordhuis
7b64da2325
Improve BigInt hashing (#38)
Fixes: https://github.com/quickjs-ng/quickjs/issues/35
2023-11-10 21:01:09 +01:00
Ben Noordhuis
8d62210e7d
Remove non-standard BigInt methods (#37)
Fixes: https://github.com/quickjs-ng/quickjs/issues/20
2023-11-10 20:10:52 +01:00
Ben Noordhuis
38f88c0898
Remove CONFIG_BIGNUM, always enable BigInt (#34)
Fixes: https://github.com/quickjs-ng/quickjs/issues/17
2023-11-10 16:09:54 +01:00
Ben Noordhuis
ae17b8522d
Remove operator overloading (#32)
Part of https://github.com/quickjs-ng/quickjs/issues/17
2023-11-10 10:23:40 +01:00
Ben Noordhuis
e449cb08ef
Remove BigFloat (#31)
Part of https://github.com/quickjs-ng/quickjs/issues/17
2023-11-08 22:23:06 +01:00
Saúl Ibarra Corretgé
c1ed688610 Drop non-standard JSON extension
Ref: https://github.com/quickjs-ng/quickjs/issues/20
2023-11-08 22:14:25 +01:00
Ben Noordhuis
5d5b3cc21f
Remove BigDecimal (#29)
Part of https://github.com/quickjs-ng/quickjs/issues/17
2023-11-08 21:07:16 +01:00
Ben Noordhuis
0068db8a11 Avoid UB when checking if float fits in int32 2023-11-08 19:17:13 +01:00
Saúl Ibarra Corretgé
2f51cbc4e6 Add CI for MinGW on Windows 2023-11-08 11:12:54 +01:00
Saúl Ibarra Corretgé
1fb9a5010f
Drop support for "use math"
Ref: https://github.com/quickjs-ng/quickjs/issues/20
2023-11-06 23:07:31 +01:00
Ben Noordhuis
d6fbd6b744 Fix UB signed integer overflow 2023-11-01 09:31:30 +01:00
Ben Noordhuis
2f7fd38f68
ci: add linux build+test workflow (#2) 2023-10-31 18:01:52 +01:00
bellard
b5e62895c6 2021-03-27 release 2021-03-27 11:17:31 +01:00
bellard
b1f67dfc1a 2020-11-08 release 2020-11-08 14:30:56 +01:00
bellard
7c312df422 2020-09-06 release 2020-09-06 19:10:15 +02:00
bellard
8900766099 2020-07-05 release 2020-09-06 19:07:30 +02:00
bellard
1722758717 2020-04-12 release 2020-09-06 19:04:20 +02:00
bellard
383e2b06c8 2020-03-16 release 2020-09-06 19:02:03 +02:00
bellard
0e8fffd4de 2020-01-19 release 2020-09-06 18:57:11 +02:00
bellard
91459fb672 2020-01-05 release 2020-09-06 18:53:08 +02:00