Nick Vatamaniuc
bd6f1d50a9
Merge d38eea93365879b5bff8b649d8dbb4dc1b849e56 into d7ae12ae71dfd6ab2997527d295014a8996fa0f9
2026-03-24 04:54:03 +00:00
Nick Vatamaniuc
d38eea9336
Avoid initializer-string warning for the digits array
...
Some newer compilers emit this warning:
```
warning: initializer-string for character array is too long, array size is 36
but initializer has size 37 (including the null terminating character);
did you mean to use the 'nonstring' attribute? [-Wunterminated-string-initialization]
12146 | static char const digits[36] = "0123456789abcdefghijklmnopqrstuvwxyz";
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
To avoid the warning initialize the array as individual characters
2026-03-24 00:53:29 -04:00
Fabrice Bellard
d7ae12ae71
added JSON.parse source text access
ci / Linux (Ubuntu) (push) Has been cancelled
ci / Linux LTO (push) Has been cancelled
ci / Linux 32bit (push) Has been cancelled
ci / linux-asan (push) Has been cancelled
ci / linux-msan (push) Has been cancelled
ci / linux-ubsan (push) Has been cancelled
ci / macOS (push) Has been cancelled
ci / macos-asan (push) Has been cancelled
ci / macos-ubsan (push) Has been cancelled
ci / freebsd (push) Has been cancelled
ci / Cosmopolitan (push) Has been cancelled
ci / MinGW Windows target (push) Has been cancelled
ci / Windows MSYS2 (push) Has been cancelled
ci / qemu-alpine (linux/386) (push) Has been cancelled
ci / qemu-alpine (linux/arm/v6) (push) Has been cancelled
ci / qemu-alpine (linux/arm/v7) (push) Has been cancelled
ci / qemu-alpine (linux/arm64) (push) Has been cancelled
ci / qemu-alpine (linux/ppc64le) (push) Has been cancelled
ci / qemu-alpine (linux/riscv64) (push) Has been cancelled
ci / qemu-alpine (linux/s390x) (push) Has been cancelled
2026-03-23 18:45:52 +01:00
Fabrice Bellard
a31dcef98c
added basic protection against too large function in serialized bytecode
ci / Linux (Ubuntu) (push) Has been cancelled
ci / Linux LTO (push) Has been cancelled
ci / Linux 32bit (push) Has been cancelled
ci / linux-asan (push) Has been cancelled
ci / linux-msan (push) Has been cancelled
ci / linux-ubsan (push) Has been cancelled
ci / macOS (push) Has been cancelled
ci / macos-asan (push) Has been cancelled
ci / macos-ubsan (push) Has been cancelled
ci / freebsd (push) Has been cancelled
ci / Cosmopolitan (push) Has been cancelled
ci / MinGW Windows target (push) Has been cancelled
ci / Windows MSYS2 (push) Has been cancelled
ci / qemu-alpine (linux/386) (push) Has been cancelled
ci / qemu-alpine (linux/arm/v6) (push) Has been cancelled
ci / qemu-alpine (linux/arm/v7) (push) Has been cancelled
ci / qemu-alpine (linux/arm64) (push) Has been cancelled
ci / qemu-alpine (linux/ppc64le) (push) Has been cancelled
ci / qemu-alpine (linux/riscv64) (push) Has been cancelled
ci / qemu-alpine (linux/s390x) (push) Has been cancelled
2026-03-21 17:49:40 +01:00
Fabrice Bellard
5022f2b76a
fixed use-after-free via re-entrant GC in FinalizationRegistry weak reference cleanup ( #494 )
2026-03-21 17:39:27 +01:00
Fabrice Bellard
e7b9f217b4
Fix async generator lifecycle bug (bnoordhuis) ( quickjs-ng/quickjs#1355 )
ci / Linux (Ubuntu) (push) Waiting to run
ci / Linux LTO (push) Waiting to run
ci / Linux 32bit (push) Waiting to run
ci / linux-asan (push) Waiting to run
ci / linux-msan (push) Waiting to run
ci / linux-ubsan (push) Waiting to run
ci / macOS (push) Waiting to run
ci / macos-asan (push) Waiting to run
ci / macos-ubsan (push) Waiting to run
ci / freebsd (push) Waiting to run
ci / Cosmopolitan (push) Waiting to run
ci / MinGW Windows target (push) Waiting to run
ci / Windows MSYS2 (push) Waiting to run
ci / qemu-alpine (linux/386) (push) Waiting to run
ci / qemu-alpine (linux/arm/v6) (push) Waiting to run
ci / qemu-alpine (linux/arm/v7) (push) Waiting to run
ci / qemu-alpine (linux/arm64) (push) Waiting to run
ci / qemu-alpine (linux/ppc64le) (push) Waiting to run
ci / qemu-alpine (linux/riscv64) (push) Waiting to run
ci / qemu-alpine (linux/s390x) (push) Waiting to run
2026-03-21 16:34:37 +01:00
Fabrice Bellard
4d16546cdf
fixed RegExp.escape
2026-03-21 15:53:25 +01:00
Fabrice Bellard
46bd985b33
fixed buffer overflow in Atomics with resizable typed arrays
2026-03-21 15:35:03 +01:00
Fabrice Bellard
16d6947b17
typo
2026-03-21 14:31:19 +01:00
Fabrice Bellard
f1b63fc1ad
Fix memory leak in Iterator.prototype.map (saghul) ( #493 )
2026-03-21 14:26:00 +01:00
Fabrice Bellard
841dd034c2
fixed buffer overflow in TypedArray.prototype.with ( #492 )
2026-03-21 14:18:38 +01:00
Fabrice Bellard
69090b969f
Fix stack underflow with generator in iterable (saghul) ( #488 )
2026-03-21 13:43:57 +01:00
Fabrice Bellard
aaf0174e71
test262 update
2026-03-21 12:39:29 +01:00
Fabrice Bellard
68caa5f226
fixed TypedArray constructor semantics which removes a buffer overflow ( #478 )
2026-03-21 12:23:53 +01:00
Fabrice Bellard
0989d4cb4a
fixed TypedArray sort semantics by copying the array before calling the comparison function. Fixed buffer overflow when the array is resized ( #477 )
2026-03-21 11:33:13 +01:00
Fabrice Bellard
4c722cea4e
modified js_allocate_fast_array() so that the array is fully initialized. It is slightly slower but avoids several nasty bugs ( #471 )
2026-03-21 10:55:57 +01:00
Fabrice Bellard
f1139494d1
regexp: removed alloca() is lre_exec() - added specific opcodes for \s and \S to have a smaller bytecode - optimized \b and \B
2025-12-22 15:12:46 +01:00
Fabrice Bellard
7bd1ae2c76
\x{N} is a syntax error
2025-12-22 15:05:37 +01:00
Fabrice Bellard
31ef02b907
slightly faster lexical variable assignment
2025-12-22 15:03:43 +01:00
Fabrice Bellard
c73a435f36
Don't call well-known Symbol methods for RegExp on primitive values
2025-12-11 19:27:19 +01:00
Fabrice Bellard
1dbba8a88e
removed use after free in js_create_module_bytecode_function() ( #467 )
2025-12-11 19:18:56 +01:00
Fabrice Bellard
fcd33c1afa
removed memory leak in case of error in cpool_add() ( #468 )
2025-12-11 19:17:38 +01:00
Fabrice Bellard
e5fd3918c1
fixed fast array extension optimization when there are multiple realms
2025-12-03 13:36:26 +01:00
Fabrice Bellard
24379bf53c
added regexp duplicate named groups - fixed reset of captures with quantizers
2025-12-03 13:30:33 +01:00
Fabrice Bellard
b226856177
updated to unicode 17.0.0 - updated test262 version
2025-11-29 15:14:41 +01:00
Fabrice Bellard
5907aa6d68
added missing lre_poll_timeout()
2025-11-29 13:13:18 +01:00
Fabrice Bellard
47aac8b2a8
regexp: cosmetic: make it clearer that there is now a set of registers instead of an auxiliary stack
2025-11-29 13:04:47 +01:00
Fabrice Bellard
371c06e359
regexp: ensure that the bytecode size grows linearly with respect to
...
the input regexp.
This way, pathological regexps such as
/(:?(:?(:?(:?(:?(:?(:?(:?(:?(:?(:?(:?(:?(?:a|)+|)+|)+|)+|)+|)+|)+|)+|)+|)+|)+|)+|)+|)+/ are no longer an issue. The generated bytecode is also simpler and
faster.
2025-11-29 12:39:52 +01:00
Fabrice Bellard
a77400796d
removed buffer overflows introduced in regexp optimizations
2025-11-22 12:10:55 +01:00
Fabrice Bellard
728ed94889
fixed Worker freeing logic ( #462 )
2025-11-22 11:03:45 +01:00
Fabrice Bellard
9f11034a5a
- optimized Regexp.prototype.exec
...
- optimized String.prototype.replace
- optimized 'arguments' object creation
- optimized access to non strict 'arguments' elements
2025-11-22 11:00:50 +01:00
Fabrice Bellard
7ab23413b8
faster and simpler implementation of regexp backtracking
2025-11-22 10:44:19 +01:00
Fabrice Bellard
fcbf5ea2a6
fixed BJSON array serialization ( #457 )
2025-11-15 14:52:50 +01:00
Fabrice Bellard
4bd485d713
- Added Iterator.concat (initial patch by bnoordhuis)
...
- optimized js_iterator_concat_next()
- added more guards against recursion in Iterator.concat operations
2025-11-15 12:22:50 +01:00
Fabrice Bellard
3d0cc291d4
optimized add/sub int32 overflow
2025-11-15 12:18:18 +01:00
Fabrice Bellard
125b01279c
added error checking in JS_InstantiateFunctionListItem()
2025-11-15 12:10:44 +01:00
Fabrice Bellard
ae7219b1a1
- Closure optimization (go from quadratic to linear time when the number
...
of closure variables is large)
- Separated JSVarDef and JSBytecodeVarDef to simplify the code and save memory
- fixed debug info stripping with global variables
2025-11-15 12:01:20 +01:00
Fabrice Bellard
9688007ccb
Restore a mistakenly removed goto on error in js_build_module_ns() (igorburago)
2025-11-05 11:46:20 +01:00
Fabrice Bellard
b07ad11c31
fixed JS_PROP_AUTOINIT handling in js_closure_define_global_var() ( #455 )
2025-11-05 11:41:18 +01:00
Fabrice Bellard
d10613f8f9
fixed exception handling in put_var operation (regression introduced by commit a6816be) ( #454 )
2025-11-05 11:29:03 +01:00
Fabrice Bellard
080c01f346
More informative "not a constructor" error message (initial patch by bnoordhuis) ( #368 )
2025-11-03 18:53:32 +01:00
Fabrice Bellard
c6fe5a98fd
Fix length check in ArrayBuffer.prototype.slice (bnoordhuis) ( #451 )
2025-11-03 18:38:20 +01:00
Fabrice Bellard
7cfddd0664
fixed DataView resizing
2025-11-03 18:29:10 +01:00
Fabrice Bellard
75b5230000
Fix use-after-free in ArrayBuffer.prototype.transfer (bnoordhuis) ( #450 ) - use js_array_buffer_update_typed_arrays() in JS_DetachArrayBuffer()
2025-11-03 18:23:19 +01:00
Fabrice Bellard
baa186fc6e
qjs: added --strict option - don't consider included files as modules - allow module and strict code with -e option
2025-11-03 17:22:18 +01:00
Fabrice Bellard
961478d7bb
removed duplicate test
2025-11-03 17:14:12 +01:00
Fabrice Bellard
e015918dd8
Much faster destructuring at the expense of a slight incompatibility
...
with the spec when direct evals are present (v8 behaves the same way).
2025-11-03 17:08:59 +01:00
Fabrice Bellard
a6816be23a
optimized global variable access
2025-11-03 16:57:20 +01:00
Fabrice Bellard
eb2c89087d
removed uninitialized variable
2025-10-18 12:04:12 +02:00
Fabrice Bellard
eab6945fca
updated test results
2025-10-18 11:09:17 +02:00