| Commit message (Collapse) | Author | Age |
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
ngx_http_js_module.c:936:22: error: initializer-string for array of ‘char’ truncates NUL terminator
but destination lacks ‘nonstring’ attribute (16 chars into 15 available) [-Werror=unterminated-string-initialization]
936 | .value = "PeriodicSession",
| ^~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
|
|
| |
In file included from src/njs_main.h:48,
from src/njs_diyfp.c:12:
src/njs_string.h: In function ‘njs_string_encode’:
src/njs_string.h:229:36: error: initializer-string for array of ‘unsigned char’
truncates NUL terminator but destination lacks ‘nonstring’ attribute (
17 chars into 16 available) [-Werror=unterminated-string-initialization]
229 | static const u_char hex[16] = "0123456789ABCDEF";
|
|
|
|
| |
Found by OSS-Fuzz.
|
|
|
|
| |
This prevents a clash with possible valid UTF-8 strings.
|
|
|
|
|
|
|
|
|
|
|
| |
In file included from src/njs_main.h:37,
from src/njs_diyfp.c:12:
src/njs_atom.h: In function ‘njs_atom_to_value’:
src/njs_atom.h:54:31: error: invalid use of incomplete typedef
‘njs_flathsh_descr_t’ {aka ‘struct njs_flathsh_descr_s’}
54 | njs_assert(atom_id < h->elts_count);
| ^~
src/njs_assert.h:14:15: note: in definition of macro ‘njs_assert’
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Implemented atom IDs for strings, symbols and small numbers, enabling
equality checks via ID comparison
- Optimized string operations for faster property lookups and comparisons
- Removed short string inlining from njs_value_t structure
Performance improvements (arewefastyet/benchmarks/v8-v7 benchmark):
- Richards: +57% (631 → 989)
- Crypto: +7% (1445 → 1551)
- RayTrace: +37% (562 → 772)
- NavierStokes: +20% (2062 → 2465)
- Overall score: +29% (1014 → 1307)
In collaboration with Dmitry Volyntsev.
|
| |
|
| |
|
|
|
|
| |
This fixes #872 on Github.
|
| |
|
|
|
|
| |
JS_VALUE_GET_OBJ(v) was made hidden in 156d981.
|
| |
|
| |
|
|
|
|
| |
No functional changes.
|
|
|
|
| |
This commit also exposed qjs_free_prop_enum() as public.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
When "%*s" is specified, the first integer is interpreted as width.
Width specifies *minimum* number of characters to output. The next
string is expected to be NULL-terminated.
When "%.*s" is specified, the first integer is interpreted as precision.
Precision specifies *maximum* number of characters to output.
|
|
|
|
| |
This fixes issues #836 on github.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Without using JS_SetOpaque(), because in QuickJS-NG opaque pointer
cannot be set for internal classes, including ordinary objects.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
Previously, njs_promise_resolve() might return njs_object_t instead of
njs_promise_t. Later an instance of njs_object_t was put into a
NJS_PROMISE value. Whereas njs_promise_t is always expected to be inside
of a NJS_PROMISE value.
This closes #813 issue on Github.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
src/qjs.c:347:19: error: variable 'signo' may be uninitialized when used
here [-Werror,-Wconditional-uninitialized]
347 | if (kill(pid, signo) < 0) {
| ^~~~~
src/qjs.c:294:31: note: initialize the variable 'signo' to silence this
warning
294 | int signo, pid;
| ^
| = 0
1 error generated.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
There are several reasons why a file cannot be opened. Without
extra information, especially in containerized environments, these
problems are difficult to debug. Adding errno status to the
error output helps identify the root cause.
Additionally, error messages are now aligned between njs and QuickJS.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, when an exception was thrown, the exception got 'stack'
property attached which contained the backtrace information about where
the exception happened. This could be a heavy operation and it was not
always needed.
To optimize it, the process is split into 2 phases. The first phase
collects all the necessary info about the current stack. The second
phase, where the stack symbolization happens, occurs only when this
property is referenced.
|
| |
|
|
|
|
| |
With empty buffers in both the self and search cases.
|
|
|
|
| |
Previous incorrect fix was introduced in 5d15a8d6 (0.8.5).
|