issue_owner_repo
listlengths 2
2
| issue_body
stringlengths 0
261k
⌀ | issue_title
stringlengths 1
925
| issue_comments_url
stringlengths 56
81
| issue_comments_count
int64 0
2.5k
| issue_created_at
stringlengths 20
20
| issue_updated_at
stringlengths 20
20
| issue_html_url
stringlengths 37
62
| issue_github_id
int64 387k
2.46B
| issue_number
int64 1
127k
|
---|---|---|---|---|---|---|---|---|---|
[
"strukturag",
"libheif"
]
| By the way, as a followup of PR #25, there is a last problem whose solution, I haven't found yet.
A simple make (crossbuild with mingw-w64) fails during linking with:
```
make all-recursive
make[1]: Entering directory '/opt/user-cache/jehan/dev/crossbuild/w64/libheif'
Making all in src
make[2]: Entering directory '/opt/user-cache/jehan/dev/crossbuild/w64/libheif/src'
/bin/sh ../libtool --tag=CXX --mode=link x86_64-w64-mingw32-g++ -I/home/jehan/.local/share/crossroad/roads/w64/libheif/include -DLIBHEIF_EXPORTS -g -O2 -Wall -Werror -Wsign-compare -Wconversion -Wno-sign-conversion -Wno-error=conversion -version-info 2:0:1 -o libheif.la -rpath /home/jehan/.local/share/crossroad/roads/w64/libheif/lib libheif_la-bitstream.lo libheif_la-box.lo libheif_la-error.lo libheif_la-heif_file.lo libheif_la-heif_image.lo libheif_la-heif.lo libheif_la-heif_context.lo libheif_la-heif_hevc.lo libheif_la-heif_plugin_registry.lo libheif_la-heif_plugin.lo libheif_la-heif_decoder_libde265.lo -lde265 -L/home/jehan/.local/share/crossroad/roads/w64/libheif/lib -lpthread
libtool: error: can't build x86_64-w64-mingw32 shared library unless -no-undefined is specified
make[2]: *** [Makefile:647: libheif.la] Error 1
make[2]: Leaving directory '/opt/user-cache/jehan/dev/crossbuild/w64/libheif/src'
make[1]: *** [Makefile:502: all-recursive] Error 1
make[1]: Leaving directory '/opt/user-cache/jehan/dev/crossbuild/w64/libheif'
make: *** [Makefile:411: all] Error 2
```
A workaround exists, which is to build with `make LDFLAGS=-no-undefined` instead (as proposed by the error message). Then it goes to the end.
I'm not sure of the cause yet. Maybe some library is missing on the linking flags. | Linking fails without -no-undefined | https://api.github.com/repos/strukturag/libheif/issues/28/comments | 1 | 2018-05-24T23:40:55Z | 2018-05-29T23:20:05Z | https://github.com/strukturag/libheif/issues/28 | 326,333,867 | 28 |
[
"strukturag",
"libheif"
]
| As reported in #25 there have been errors when cross-compiling using mingw32. We should cover that with Travis. | CI: Cross compile for Windows using mingw32 | https://api.github.com/repos/strukturag/libheif/issues/26/comments | 1 | 2018-05-24T21:39:08Z | 2018-06-06T19:59:06Z | https://github.com/strukturag/libheif/issues/26 | 326,304,961 | 26 |
[
"strukturag",
"libheif"
]
| We got an issue reported for ImageMagick (https://github.com/ImageMagick/ImageMagick/issues/1131) about a crash when reading an heic image multithreaded. Is this a bug in the library or should we make sure that heic images are always read in a single thread? | Thread safety | https://api.github.com/repos/strukturag/libheif/issues/23/comments | 1 | 2018-05-16T09:06:05Z | 2018-05-22T14:23:15Z | https://github.com/strukturag/libheif/issues/23 | 323,530,987 | 23 |
[
"strukturag",
"libheif"
]
| Apologies, asking for a release/asking for information on when the next release is likely to be always feels like a big of a nag.
Just wondering if it'd be possible to get an estimate on that because the current 1.1.0 release doesn't compile on macOS. Has already been fixed in master with https://github.com/strukturag/libheif/commit/001a93c2, https://github.com/strukturag/libheif/commit/7ac92eb0 & https://github.com/strukturag/libheif/commit/a237e50a. As far as I'm aware those are the only clang/macOS issues present currently; the current master branch here builds fine. | New release? | https://api.github.com/repos/strukturag/libheif/issues/22/comments | 5 | 2018-05-14T23:45:16Z | 2018-05-26T22:46:59Z | https://github.com/strukturag/libheif/issues/22 | 323,019,027 | 22 |
[
"strukturag",
"libheif"
]
| i have ubuntu 16.04 , can i install libheif with apt-get instead of cloning this git repository and run `./configure`, `make` and `make install` ?
| install libheif with apt-get | https://api.github.com/repos/strukturag/libheif/issues/21/comments | 3 | 2018-05-14T09:34:34Z | 2019-11-11T00:31:20Z | https://github.com/strukturag/libheif/issues/21 | 322,740,101 | 21 |
[
"strukturag",
"libheif"
]
| The @ImageMagick project is using https://github.com/google/oss-fuzz to find bugs in our own library and in libraries that we use. The fuzzer found an issue and we think this is an issue that should be resolved in the library that we use. This issue is posted under the url https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8136 that is not publicly visible yet but added as a link for future reference. Below are the details of the issue that can be reproduced using the following technique: https://github.com/google/oss-fuzz/blob/master/docs/reproducing.md
Stacktrace:
```
==1==ERROR: AddressSanitizer: stack-overflow on address 0x7ffdcfa72ff8 (pc 0x000000db0f88 bp 0x7ffdcfa73010 sp 0x7ffdcfa73000 T0)
--
| SCARINESS: 10 (stack-overflow)
| #0 0xdb0f87 in heif::BitstreamRange::read(unsigned long) libheif/src/bitstream.h:65
| #1 0xdb1055 in heif::BitstreamRange::read(unsigned long) libheif/src/bitstream.h:68:27
| #2 0xdb1055 in heif::BitstreamRange::read(unsigned long) libheif/src/bitstream.h:68:27
| #3 0xdb1055 in heif::BitstreamRange::read(unsigned long) libheif/src/bitstream.h:68:27
| #4 0xdb1055 in heif::BitstreamRange::read(unsigned long) libheif/src/bitstream.h:68:27
| #5 0xdb1055 in heif::BitstreamRange::read(unsigned long) libheif/src/bitstream.h:68:27
| #6 0xdb1055 in heif::BitstreamRange::read(unsigned long) libheif/src/bitstream.h:68:27
| #7 0xdb1055 in heif::BitstreamRange::read(unsigned long) libheif/src/bitstream.h:68:27
| #8 0xdb1055 in heif::BitstreamRange::read(unsigned long) libheif/src/bitstream.h:68:27
```
Links:
https://github.com/strukturag/libheif/blob/0a0db99176355c51a7785a7a6442baacac65f854/src/bitstream.h#L65
https://github.com/strukturag/libheif/blob/0a0db99176355c51a7785a7a6442baacac65f854/src/bitstream.h#L68
Commit: 0a0db99176355c51a7785a7a6442baacac65f854
Testcase file: [clusterfuzz-testcase-minimized-ping_heic_fuzzer-4721040704929792.zip](https://github.com/strukturag/libheif/files/1998519/clusterfuzz-testcase-minimized-ping_heic_fuzzer-4721040704929792.zip)
| Stack-overflow (8136) | https://api.github.com/repos/strukturag/libheif/issues/20/comments | 1 | 2018-05-13T13:57:44Z | 2018-05-23T10:20:50Z | https://github.com/strukturag/libheif/issues/20 | 322,596,162 | 20 |
[
"strukturag",
"libheif"
]
| Is there any builds/download available for libheif.js? | libheif.js | https://api.github.com/repos/strukturag/libheif/issues/18/comments | 3 | 2018-05-10T04:23:44Z | 2020-11-21T20:51:50Z | https://github.com/strukturag/libheif/issues/18 | 321,805,140 | 18 |
[
"strukturag",
"libheif"
]
| We should also check the encoding in the fuzzer. Fuzzed parameters could be the image size, color format, encoder parameters and algorithmically generated image content.
| set up a fuzzer test for heif encoder | https://api.github.com/repos/strukturag/libheif/issues/17/comments | 2 | 2018-05-09T09:28:35Z | 2018-06-15T13:07:57Z | https://github.com/strukturag/libheif/issues/17 | 321,496,595 | 17 |
[
"strukturag",
"libheif"
]
| Hello. I'm a iOS developer and recently I'm build a iOS-library which integrate libheif to a third-party lib [SDWebImageHEIFCoder](https://github.com/dreampiggy/SDWebImageHEIFCoder). Which support HEIF/HEIC decoding in old version iOS/macOS firmware. (Since iOS 11 & macOS 10.13 support HEIC natively)
But since I'm not an expert in image processing field, here are some questions I faced during the development. Some questions may be silly and I hope this will not bother someone :)
### Readme
It seems some part of Readme is out-of-date.
+ `heif_context_new_heic` this API is not available now. Maybe we can update the demo code about encoding ?
+ `frame-parallel` branch described in the compile part seems out-of-date. I try this branch of libde265 but this can't compile with the `master` branch of libheif or latest v1.1.0 tag. So I then use the latest v1.0.3 tag of libde265 with v1.1.0 libheif tag to compile to iOS/macOS platform.
### Compile
I find that your're also the maintainer of [libde265](https://github.com/strukturag/libde265), So I put the question here.
To compile to iOS platform, I'm using Cmake with [ios-cmake](https://github.com/leetal/ios-cmake). For macOS, just using the official Cmake. All of following problem is about Cmake compile issue. (Not using autoconf)
+ libde265 `master` branch or latest tag can not compile with the build-in config. It seems this API `memalign` is not availble on macOS & iOS platform.
I solve this by passing `-DHAVE_POSIX_MEMALIGN` flag to Cmake to use `posix_memalign` instead. However, since Cmake support feature detect, maybe this flag can be automatically config instead of manual set?
+ libde265 `master` branch or latest tag can not compile with the build-in config. It seems the SSE4.1 detect cause some issue. See the log here:
```
[ 34%] Building CXX object libde265/x86/CMakeFiles/x86_sse.dir/sse-motion.cc.o
/Users/lizhuoli/Documents/GitHub/libde265/libde265/x86/sse-motion.cc:746:29: error:
always_inline function '_mm_packus_epi32' requires target feature
'sse4.1', but would be inlined into function
'ff_hevc_weighted_pred_avg_8_sse4' that is compiled without support for
'sse4.1'
r0 = _mm_packus_epi32(r0, r2);
^
/Users/lizhuoli/Documents/GitHub/libde265/libde265/x86/sse-motion.cc:747:29: error:
always_inline function '_mm_packus_epi32' requires target feature
'sse4.1', but would be inlined into function
'ff_hevc_weighted_pred_avg_8_sse4' that is compiled without support for
'sse4.1'
r1 = _mm_packus_epi32(r1, r3);
```
I solve this by passing `-DDISABLE_SSE` flag to Cmake to disable it. However, since ARM64 support SSE4.1, I guess this is not a good solution.
### Usage
After I compile the binary for iOS & macOS platform and start using libheif. Though I can successfully run the demo and see the HEIF image decoding works. But there are some question I want to know.
+ Does libheif support progressive/Incremental image decoding ? Because my lib is a plugin to an image loading system, which support rendering partial image during large image download.
+ libheif's this encoding API `heif_context_write` seems a little wired. I think this may be some misunderstanding from me but libheif library (See the code comments below). I use this API to write the encoded heif data to a memory representation but not file.
```c
static struct heif_error WriteImageData(struct heif_context* ctx,
const void* data, size_t size, void* userdata) {
__autoreleasing NSData **imageData = (__autoreleasing NSData **)userdata;
NSCParameterAssert(imageData);
heif_error error;
if (!data) {
// Can this rgba data be NULL ?
// And how can I get the error information about this because there are no public API or input arg to grab the error information
error.code = heif_error_Encoder_plugin_error;
return error;
}
*imageData = [NSData dataWithBytes:data length:size];
error.code = heif_error_Ok;
return error;
}
// test code
void test() {
NSData *data;
heif_writer *writer;
writer->writer_api_version = 1;
writer->write = WriteImageData; // This is a function pointer
error = heif_context_write(ctx, writer, &data);
}
```
| Question about compile & usage on iOS/macOS platform | https://api.github.com/repos/strukturag/libheif/issues/16/comments | 27 | 2018-05-09T03:04:08Z | 2023-07-26T10:04:59Z | https://github.com/strukturag/libheif/issues/16 | 321,414,362 | 16 |
[
"strukturag",
"libheif"
]
| The @ImageMagick project is using https://github.com/google/oss-fuzz to find bugs in our own library and in libraries that we use. The fuzzer found an issue and we think this is an issue that should be resolved in the library that we use. This issue is posted under the url https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8062 that is not publicly visible yet but added as a link for future reference. Below are the details of the issue that can be reproduced using the following technique: https://github.com/google/oss-fuzz/blob/master/docs/reproducing.md
Stacktrace:
```
/usr/local/bin/../include/c++/v1/sstream:599:12: runtime error: signed integer overflow: 16 + 9223372036854775792 cannot be represented in type 'long long'
#0 0x437982 in std::__1::basic_stringbuf<char, std::__1::char_traits<char>, std::__1::allocator<char> >::seekoff(long long, std::__1::ios_base::seekdir, unsigned int) /usr/local/include/c++/v1/sstream:599:12
#1 0xf9608c in std::__1::basic_istream<char, std::__1::char_traits<char> >::seekg(long long, std::__1::ios_base::seekdir)
#2 0x9329d4 in heif::Box::parse(heif::BitstreamRange&) libheif/src/box.cc:291:28
#3 0x934025 in heif::Box::read(heif::BitstreamRange&, std::__1::shared_ptr<heif::Box>*) libheif/src/box.cc:434:20
#4 0x96d96b in heif::HeifFile::parse_heif_file(heif::BitstreamRange&) libheif/src/heif_file.cc:165:19
#5 0x971c78 in heif::HeifFile::read_from_memory(void const*, unsigned long) libheif/src/heif_file.cc:81:17
#6 0x916524 in heif::HeifContext::read_from_memory(void const*, unsigned long) libheif/src/heif_context.cc:361:28
#7 0x9029b8 in heif_context_read_from_memory libheif/src/heif.cc:107:29
#8 0x7add39 in ReadHEICImage imagemagick/coders/heic.c:195:9
#9 0x53fc60 in ReadImage imagemagick/MagickCore/constitute.c:500:13
```
Links:
https://github.com/strukturag/libheif/blob/b56e683d05e60a8efcbf6eddbd6f22672b407659/src/box.cc#L291
Commit: b56e683d05e60a8efcbf6eddbd6f22672b407659
Testcase file: [clusterfuzz-testcase-minimized-ping_heic_fuzzer-5816072648261632.zip](https://github.com/strukturag/libheif/files/1983645/clusterfuzz-testcase-minimized-ping_heic_fuzzer-5816072648261632.zip)
| Integer-overflow (8062) | https://api.github.com/repos/strukturag/libheif/issues/15/comments | 1 | 2018-05-08T11:27:01Z | 2018-05-23T09:51:10Z | https://github.com/strukturag/libheif/issues/15 | 321,147,221 | 15 |
[
"strukturag",
"libheif"
]
| We are using libheif in the @ImageMagick project and I was trying to print the message from the `heif_error` struct to give our users a better error message. But it turns out that we cannot use this in the C api because the error class is freed and then `error.message` points to an invalid memory block.
```C
struct heif_error heif_decode_image(const struct heif_image_handle* in_handle,
struct heif_image** out_img,
heif_colorspace colorspace,
heif_chroma chroma,
const struct heif_decoding_options* options)
{
std::shared_ptr<HeifPixelImage> img;
Error err = in_handle->image->decode_image(img,
colorspace,
chroma,
options);
if (err.error_code != heif_error_Ok) {
// After the return `err` gets freed and message points to an invalid block of memory.
return err.error_struct(in_handle->image.get());
}
*out_img = new heif_image();
(*out_img)->image = std::move(img);
return Error::Ok.error_struct(in_handle->image.get());
}
```
This can be resolved by making a copy of the string before this is copied to the error message but that means we would need to free the error message after each call. There is a comment that the error message will never be null. But I personally don't care about the error message when the message is `Success` and then we would need to free it every time. I don't know what the best solution is for this issue so I will leave the solution up to you. | error message in C api. | https://api.github.com/repos/strukturag/libheif/issues/14/comments | 2 | 2018-04-28T12:25:06Z | 2018-04-28T12:58:03Z | https://github.com/strukturag/libheif/issues/14 | 318,631,870 | 14 |
[
"strukturag",
"libheif"
]
| We create binaries for the @ImageMagick project with Visual Studio 2013 but that fails to build at the moment. This is failing because `constexpr` is not supported. The main issue is `fourcc` and the switch in `Box::read` because that actually requires a constant value. This is what they use in webp:
```#define MKFOURCC(a, b, c, d) ((a) | (b) << 8 | (c) << 16 | (uint32_t)(d) << 24)```
I don't mind sending and testing a PR if you tell me what kind of solution you want for this. | Build libheif with Visual Studio 2013. | https://api.github.com/repos/strukturag/libheif/issues/12/comments | 4 | 2018-04-27T13:42:08Z | 2022-01-11T18:40:27Z | https://github.com/strukturag/libheif/issues/12 | 318,414,305 | 12 |
[
"strukturag",
"libheif"
]
| We should update the AppVeyor tests to also build the plugins on Windows. This will help catching errors like #9 in the future. | Test building with plugins on Windows | https://api.github.com/repos/strukturag/libheif/issues/10/comments | 0 | 2018-04-27T08:45:55Z | 2018-04-27T13:52:33Z | https://github.com/strukturag/libheif/issues/10 | 318,325,966 | 10 |
[
"strukturag",
"libheif"
]
| hi,I get bitstream through the nokiatech/heif library. How do I turn bitstream into rgba data?thank you! | How can I get the bitstream into RGBA data? | https://api.github.com/repos/strukturag/libheif/issues/6/comments | 1 | 2018-03-20T07:05:26Z | 2018-04-27T13:56:17Z | https://github.com/strukturag/libheif/issues/6 | 306,750,365 | 6 |
[
"strukturag",
"libheif"
]
| Hello,
I am using this libheif for some developments. My goal is to use libheif as a muxer. Now I can get single HEVC I-Frame and want to use this libheif to mux(convert) to heic format.
From readme, it tells the "heif_context_write_to_file()" can output the heic file with encoded heic_image structure. Can I just memcpy the prepared hevc image to heic_image plane and invoke heif_context_write_to_file() to generate the heic file?.
Any comments or documents are welcome, thank you. | examples for heic muxer | https://api.github.com/repos/strukturag/libheif/issues/5/comments | 8 | 2018-03-15T09:17:48Z | 2019-11-21T01:50:48Z | https://github.com/strukturag/libheif/issues/5 | 305,469,742 | 5 |
[
"jerryscript-project",
"jerryscript"
]
| ###### Commit ID
2dbb6f79efa08767ce44fbc8e3f26e80649295d7
###### Build platform
Ubuntu 22.04.3
###### Build steps
```sh
python3 ./tools/build.py --builddir=xxx --clean --compile-flag=-fsanitize=address --compile-flag=-g --strip=off --lto=off --logging=on --line-info=on --error-message=on --stack-limit=20
```
###### Test case
```sh
function a(lastIndex) {
let fake_re = {
exec: () => Symbol,
get lastIndex() {
return lastIndex;
},
set lastIndex(value) {},
get global() {
return true;
}
};
RegExp.prototype[Symbol.replace].call(fake_re, "");
}
a(0);
```
###### Execution steps
```sh
./jerry poc.js
```
###### Output
```sh
Release:
Program received signal SIGABRT, Aborted.
__pthread_kill_implementation (no_tid=0, signo=6, threadid=140737350473600) at ./nptl/pthread_kill.c:44
44 ./nptl/pthread_kill.c: No such file or directory.
(gdb) bt
#0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=140737350473600) at ./nptl/pthread_kill.c:44
#1 __pthread_kill_internal (signo=6, threadid=140737350473600) at ./nptl/pthread_kill.c:78
#2 __GI___pthread_kill (threadid=140737350473600, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
#3 0x00007ffff7cc6476 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#4 0x00007ffff7cac7f3 in __GI_abort () at ./stdlib/abort.c:79
#5 0x000000000080777e in jerry_port_fatal (code=code@entry=JERRY_FATAL_REF_COUNT_LIMIT) at /jerryscript/jerry-port/common/jerry-port-process.c:29
#6 0x0000000000632ab7 in jerry_fatal (code=3616307, code@entry=JERRY_FATAL_REF_COUNT_LIMIT) at /jerryscript/jerry-core/jrt/jrt-fatals.c:63
#7 0x000000000050b978 in ecma_ref_object_inline (object_p=<optimized out>) at /jerryscript/jerry-core/ecma/base/ecma-gc.c:143
#8 0x000000000054c803 in ecma_copy_value (value=1019) at /jerryscript/jerry-core/ecma/base/ecma-helpers-value.c:894
#9 0x000000000054c989 in ecma_fast_copy_value (value=3616307) at /jerryscript/jerry-core/ecma/base/ecma-helpers-value.c:921
#10 0x00000000007864e2 in ecma_op_resolve_reference_value (lex_env_p=0x12212f8 <jerry_global_heap+248>, name_p=0x104d) at /jerryscript/jerry-core/ecma/operations/ecma-reference.c:300
#11 0x00000000006c6d4d in vm_loop (frame_ctx_p=0x7fffffffd080) at /jerryscript/jerry-core/vm/vm.c:1044
#12 0x00000000006c2c00 in vm_execute (frame_ctx_p=frame_ctx_p@entry=0x7fffffffd080) at /jerryscript/jerry-core/vm/vm.c:5211
#13 0x00000000006c0ce4 in vm_run (shared_p=shared_p@entry=0x7fffffffd1a0, this_binding_value=this_binding_value@entry=11, lex_env_p=lex_env_p@entry=0x12214e8 <jerry_global_heap+744>)
at /jerryscript/jerry-core/vm/vm.c:5312
#14 0x00000000005ce740 in ecma_op_function_call_simple (func_obj_p=<optimized out>, this_binding=11, arguments_list_p=<optimized out>, arguments_list_len=<optimized out>)
at /jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1180
#15 0x00000000005cdd10 in ecma_op_function_call (func_obj_p=func_obj_p@entry=0x1221508 <jerry_global_heap+776>, this_arg_value=this_arg_value@entry=771,
arguments_list_p=arguments_list_p@entry=0x7fffffffd440, arguments_list_len=arguments_list_len@entry=1) at /jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1414
#16 0x000000000060dffc in ecma_regexp_replace_helper (this_arg=3616307, string_arg=<optimized out>, replace_arg=<optimized out>) at /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:2619
#17 0x00000000007518c8 in ecma_builtin_regexp_prototype_dispatch_routine (builtin_routine_id=<optimized out>, this_arg=771, arguments_list_p=<optimized out>, arguments_number=<optimized out>)
at /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-regexp-prototype.c:602
#18 0x00000000005809a5 in ecma_builtin_dispatch_routine (this_arg_value=771, arguments_list_p=0x6, arguments_list_len=1, func_obj_p=<optimized out>)
at /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1460
#19 ecma_builtin_dispatch_call (obj_p=<optimized out>, this_arg_value=<optimized out>, arguments_list_p=<optimized out>, arguments_list_len=<optimized out>)
at /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1489
#20 0x00000000005cef84 in ecma_op_function_call_native_built_in (func_obj_p=func_obj_p@entry=0x1221638 <jerry_global_heap+1080>, this_arg_value=this_arg_value@entry=771,
arguments_list_p=arguments_list_p@entry=0x7fffffffdaa4, arguments_list_len=arguments_list_len@entry=1) at /jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1223
#21 0x00000000005cdce8 in ecma_op_function_call (func_obj_p=func_obj_p@entry=0x1221638 <jerry_global_heap+1080>, this_arg_value=771, arguments_list_p=0x7fffffffdaa4, arguments_list_len=1)
at /jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1419
#22 0x0000000000720bf5 in ecma_builtin_function_prototype_object_call (func_obj_p=0x1221638 <jerry_global_heap+1080>, arguments_list_p=0x7fffffffdaa0, arguments_number=<optimized out>)
at /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-function-prototype.c:288
#23 ecma_builtin_function_prototype_dispatch_routine (builtin_routine_id=<optimized out>, this_arg=<optimized out>, arguments_list_p=<optimized out>, arguments_number=<optimized out>)
at /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-function-prototype.c:529
#24 0x00000000005809a5 in ecma_builtin_dispatch_routine (this_arg_value=1083, arguments_list_p=0x6, arguments_list_len=2, func_obj_p=<optimized out>)
at /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1460
#25 ecma_builtin_dispatch_call (obj_p=<optimized out>, this_arg_value=<optimized out>, arguments_list_p=<optimized out>, arguments_list_len=<optimized out>)
at /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1489
#26 0x00000000005cef84 in ecma_op_function_call_native_built_in (func_obj_p=func_obj_p@entry=0x1221658 <jerry_global_heap+1112>, this_arg_value=this_arg_value@entry=1083,
arguments_list_p=arguments_list_p@entry=0x7fffffffdd54, arguments_list_len=arguments_list_len@entry=2) at /jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1223
#27 0x00000000005cdce8 in ecma_op_function_call (func_obj_p=0x1221658 <jerry_global_heap+1112>, this_arg_value=this_arg_value@entry=1083, arguments_list_p=arguments_list_p@entry=0x7fffffffdd54,
arguments_list_len=arguments_list_len@entry=2) at /jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1419
#28 0x00000000005cda16 in ecma_op_function_validated_call (callee=1115, this_arg_value=1083, arguments_list_p=arguments_list_p@entry=0x7fffffffdd54, arguments_list_len=arguments_list_len@entry=2)
at /jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1379
#29 0x00000000006c370c in opfunc_call (frame_ctx_p=0x7fffffffdd00) at /jerryscript/jerry-core/vm/vm.c:758
#30 vm_execute (frame_ctx_p=frame_ctx_p@entry=0x7fffffffdd00) at /jerryscript/jerry-core/vm/vm.c:5217
#31 0x00000000006c0ce4 in vm_run (shared_p=shared_p@entry=0x7fffffffde40, this_binding_value=this_binding_value@entry=11, lex_env_p=lex_env_p@entry=0x12214e8 <jerry_global_heap+744>)
at /jerryscript/jerry-core/vm/vm.c:5312
#32 0x00000000005ce740 in ecma_op_function_call_simple (func_obj_p=<optimized out>, this_binding=11, arguments_list_p=<optimized out>, arguments_list_len=<optimized out>)
at /jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1180
#33 0x00000000005cdd10 in ecma_op_function_call (func_obj_p=0x12214d8 <jerry_global_heap+728>, this_arg_value=this_arg_value@entry=72, arguments_list_p=arguments_list_p@entry=0x7fffffffe0e8,
arguments_list_len=arguments_list_len@entry=1) at /jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1414
--Type <RET> for more, q to quit, c to continue without paging--
#34 0x00000000005cda16 in ecma_op_function_validated_call (callee=731, this_arg_value=72, arguments_list_p=arguments_list_p@entry=0x7fffffffe0e8, arguments_list_len=arguments_list_len@entry=1)
at /jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1379
#35 0x00000000006c370c in opfunc_call (frame_ctx_p=0x7fffffffe0a0) at /jerryscript/jerry-core/vm/vm.c:758
#36 vm_execute (frame_ctx_p=frame_ctx_p@entry=0x7fffffffe0a0) at /jerryscript/jerry-core/vm/vm.c:5217
#37 0x00000000006c0ce4 in vm_run (shared_p=shared_p@entry=0x7fffffffe1e0, this_binding_value=<optimized out>, lex_env_p=0x12212f8 <jerry_global_heap+248>) at /jerryscript/jerry-core/vm/vm.c:5312
#38 0x00000000006c0607 in vm_run_global (bytecode_p=0x1221798 <jerry_global_heap+1432>, function_object_p=<optimized out>) at /jerryscript/jerry-core/vm/vm.c:286
#39 0x00000000004ed25d in jerry_run (script=script@entry=715) at /jerryscript/jerry-core/api/jerryscript.c:554
#40 0x0000000000804393 in jerryx_source_exec_script (path_p=<optimized out>) at /jerryscript/jerry-ext/util/sources.c:68
#41 0x00000000004e0161 in main (argc=<optimized out>, argv=<optimized out>) at /jerryscript/jerry-main/main-desktop.c:156
Debug:
Error: JERRY_FATAL_REF_COUNT_LIMIT
Aborted
``` | Abort in jerry | https://api.github.com/repos/jerryscript-project/jerryscript/issues/5154/comments | 0 | 2024-08-06T03:28:31Z | 2024-08-06T03:28:31Z | https://github.com/jerryscript-project/jerryscript/issues/5154 | 2,449,858,002 | 5,154 |
[
"jerryscript-project",
"jerryscript"
]
| ###### Commit ID
2dbb6f79efa08767ce44fbc8e3f26e80649295d7
###### Build platform
Ubuntu 22.04.3
###### Build steps
```sh
python3 ./tools/build.py --builddir=xxx --clean --compile-flag=-fsanitize=address --compile-flag=-g --strip=off --lto=off --logging=on --line-info=on --error-message=on --stack-limit=20
```
###### Execution steps
```sh
./jerry poc.js
```
###### Test case
```sh
//poc1.js
class C { async#* method () {
class
```
###### Output
```sh
AddressSanitizer:DEADLYSIGNAL
=================================================================
==2742590==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000008 (pc 0x0000007a8144 bp 0x7fff473ce8f0 sp 0x7fff473ce6a0 T0)
==2742590==The signal is caused by a READ memory access.
==2742590==Hint: address points to the zero page.
#0 0x7a8144 in parser_parse_class /jerryscript/jerry-core/parser/js/js-parser-expr.c:1016:46
#1 0x7dabc6 in parser_parse_statements /jerryscript/jerry-core/parser/js/js-parser-statm.c:2787:9
#2 0x647e67 in parser_parse_function /jerryscript/jerry-core/parser/js/js-parser.c:2717:3
#3 0x79eec2 in lexer_construct_function_object /jerryscript/jerry-core/parser/js/js-lexer.c:2695:23
#4 0x7aa79e in parser_parse_class_body /jerryscript/jerry-core/parser/js/js-parser-expr.c:911:39
#5 0x7aa79e in parser_parse_class /jerryscript/jerry-core/parser/js/js-parser-expr.c:1113:27
#6 0x7dabc6 in parser_parse_statements /jerryscript/jerry-core/parser/js/js-parser-statm.c:2787:9
#7 0x663433 in parser_parse_source /jerryscript/jerry-core/parser/js/js-parser.c:2280:5
#8 0x6611ca in parser_parse_script /jerryscript/jerry-core/parser/js/js-parser.c:3332:38
#9 0x4ec611 in jerry_parse_common /jerryscript/jerry-core/api/jerryscript.c:418:21
#10 0x4ec23e in jerry_parse /jerryscript/jerry-core/api/jerryscript.c:486:10
#11 0x80402d in jerryx_source_parse_script /jerryscript/jerry-ext/util/sources.c:52:26
#12 0x80432c in jerryx_source_exec_script /jerryscript/jerry-ext/util/sources.c:63:26
#13 0x4e0160 in main /jerryscript/jerry-main/main-desktop.c:156:20
#14 0x7fdcb820ad8f (/lib/x86_64-linux-gnu/libc.so.6+0x29d8f)
#15 0x7fdcb820ae3f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e3f)
#16 0x427fd4 in _start (/jerryscript/0805/bin/jerry+0x427fd4)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /jerryscript/jerry-core/parser/js/js-parser-expr.c:1016:46 in parser_parse_class
==2742590==ABORTING
```
###### Test case
```sh
//poc2.js
class C { async#* method () {
for ()
```
###### Output
```sh
AddressSanitizer:DEADLYSIGNAL
=================================================================
==2736108==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000008 (pc 0x0000007dae99 bp 0x7ffe22722210 sp 0x7ffe22721760 T0)
==2736108==The signal is caused by a READ memory access.
==2736108==Hint: address points to the zero page.
#0 0x7dae99 in parser_parse_for_statement_start /jerryscript/jerry-core/parser/js/js-parser-statm.c:1137:62
#1 0x7dae99 in parser_parse_statements /jerryscript/jerry-core/parser/js/js-parser-statm.c:2851:9
#2 0x647e67 in parser_parse_function /jerryscript/jerry-core/parser/js/js-parser.c:2717:3
#3 0x79eec2 in lexer_construct_function_object /jerryscript/jerry-core/parser/js/js-lexer.c:2695:23
#4 0x7aa79e in parser_parse_class_body /jerryscript/jerry-core/parser/js/js-parser-expr.c:911:39
#5 0x7aa79e in parser_parse_class /jerryscript/jerry-core/parser/js/js-parser-expr.c:1113:27
#6 0x7dabc6 in parser_parse_statements /jerryscript/jerry-core/parser/js/js-parser-statm.c:2787:9
#7 0x663433 in parser_parse_source /jerryscript/jerry-core/parser/js/js-parser.c:2280:5
#8 0x6611ca in parser_parse_script /jerryscript/jerry-core/parser/js/js-parser.c:3332:38
#9 0x4ec611 in jerry_parse_common /jerryscript/jerry-core/api/jerryscript.c:418:21
#10 0x4ec23e in jerry_parse /jerryscript/jerry-core/api/jerryscript.c:486:10
#11 0x80402d in jerryx_source_parse_script /jerryscript/jerry-ext/util/sources.c:52:26
#12 0x80432c in jerryx_source_exec_script /jerryscript/jerry-ext/util/sources.c:63:26
#13 0x4e0160 in main /jerryscript/jerry-main/main-desktop.c:156:20
#14 0x7f064248dd8f (/lib/x86_64-linux-gnu/libc.so.6+0x29d8f)
#15 0x7f064248de3f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e3f)
#16 0x427fd4 in _start (/jerryscript/0805/bin/jerry+0x427fd4)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /jerryscript/jerry-core/parser/js/js-parser-statm.c:1137:62 in parser_parse_for_statement_start
==2736108==ABORTING
``` | SEGV in parser_parse_class and parser_parse_for_statement_start | https://api.github.com/repos/jerryscript-project/jerryscript/issues/5153/comments | 0 | 2024-08-05T09:52:28Z | 2024-08-05T09:52:28Z | https://github.com/jerryscript-project/jerryscript/issues/5153 | 2,448,123,691 | 5,153 |
[
"jerryscript-project",
"jerryscript"
]
| ###### Commit ID
2dbb6f79efa08767ce44fbc8e3f26e80649295d7
###### Build platform
Ubuntu 22.04.3
###### Build steps
```sh
python3 ./tools/build.py --builddir=xxx --clean --compile-flag=-fsanitize=address --compile-flag=-g --strip=off --lto=off --logging=on --line-info=on --error-message=on --stack-limit=20
```
###### Test case
```sh
var a = [ ] ;
for ( var v = 0 ; v < 256 ; v ++ ) {
var n = Object . create ( null ) ;
a . push ( n , a ) ;
n = new WeakSet ( a ) ;
n . o = [ ] ;
} T(Promise.resolve('success'))
BigInt ( 4 );
```
###### Execution steps
```sh
./jerry poc.js
```
###### Output
```sh
Unhandled exception: ReferenceError: T is not defined
0:/default/crashes/id:000033,sig:06,src:0009
AddressSanitizer:DEADLYSIGNAL
=================================================================
==2065425==ERROR: AddressSanitizer: SEGV on unknown address (pc 0x00000050c644 bp 0x0000000000c0 sp 0x7ffc795bc3b0 T0)
==2065425==The signal is caused by a READ memory access.
==2065425==Hint: this fault was caused by a dereference of a high value address (see register values below). Disassemble the provided pc to learn which register was used.
#0 0x50c644 in ecma_gc_free_native_pointer /jerryscript/jerry-core/ecma/base/ecma-gc.c:1311:75
#1 0x50c644 in ecma_gc_free_property /jerryscript/jerry-core/ecma/base/ecma-gc.c:1648:7
#2 0x50cb48 in ecma_gc_free_properties /jerryscript/jerry-core/ecma/base/ecma-gc.c:1684:7
#3 0x50fb49 in ecma_gc_free_object /jerryscript/jerry-core/ecma/base/ecma-gc.c:2108:3
#4 0x50fb49 in ecma_gc_run /jerryscript/jerry-core/ecma/base/ecma-gc.c:2236:5
#5 0x55aa24 in ecma_finalize /jerryscript/jerry-core/ecma/base/ecma-init-finalize.c:83:5
#6 0x4eb545 in jerry_cleanup /jerryscript/jerry-core/api/jerryscript.c:229:3
#7 0x4e0b2f in main /jerryscript/jerry-main/main-desktop.c:264:3
#8 0x7fb8baa4ed8f (/lib/x86_64-linux-gnu/libc.so.6+0x29d8f)
#9 0x7fb8baa4ee3f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e3f)
#10 0x427fd4 in _start (/jerryscript/0805/bin/jerry+0x427fd4)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /jerryscript/jerry-core/ecma/base/ecma-gc.c:1311:75 in ecma_gc_free_native_pointer
==2065425==ABORTING
``` | SEGV in ecma_gc_free_native_pointer | https://api.github.com/repos/jerryscript-project/jerryscript/issues/5152/comments | 0 | 2024-08-05T09:27:27Z | 2024-08-05T09:27:27Z | https://github.com/jerryscript-project/jerryscript/issues/5152 | 2,448,066,504 | 5,152 |
[
"jerryscript-project",
"jerryscript"
]
| ###### Commit ID
2dbb6f79efa08767ce44fbc8e3f26e80649295d7
###### Build platform
Ubuntu 22.04.3
###### Build steps
```sh
python3 ./tools/build.py --builddir=xxx --clean --compile-flag=-fsanitize=address --compile-flag=-g --strip=off --lto=off --logging=on --line-info=on --error-message=on --stack-limit=20
```
###### Test case
```sh
class s extends Uint32Array { static { } const }
const n = new s ( ) ;
```
###### Execution steps
```sh
./jerry poc.js
```
###### Output
```sh
=================================================================
==880670==ERROR: AddressSanitizer: global-buffer-overflow on address 0x0000012211fc at pc 0x00000067e7fb bp 0x7ffddd05ca10 sp 0x7ffddd05ca08
READ of size 2 at 0x0000012211fc thread T0
#0 0x67e7fa in scanner_literal_is_created /jerryscript/jerry-core/parser/js/js-scanner-util.c:2922:44
#1 0x7e82c1 in parser_parse_var_statement /jerryscript/jerry-core/parser/js/js-parser-statm.c:523:15
#2 0x7da089 in parser_parse_statements /jerryscript/jerry-core/parser/js/js-parser-statm.c:2781:9
#3 0x663433 in parser_parse_source /jerryscript/jerry-core/parser/js/js-parser.c:2280:5
#4 0x6611ca in parser_parse_script /jerryscript/jerry-core/parser/js/js-parser.c:3332:38
#5 0x4ec611 in jerry_parse_common /jerryscript/jerry-core/api/jerryscript.c:418:21
#6 0x4ec23e in jerry_parse /jerryscript/jerry-core/api/jerryscript.c:486:10
#7 0x80402d in jerryx_source_parse_script /jerryscript/jerry-ext/util/sources.c:52:26
#8 0x80432c in jerryx_source_exec_script /jerryscript/jerry-ext/util/sources.c:63:26
#9 0x4e0160 in main /jerryscript/jerry-main/main-desktop.c:156:20
#10 0x7f0ac095fd8f (/lib/x86_64-linux-gnu/libc.so.6+0x29d8f)
#11 0x7f0ac095fe3f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e3f)
#12 0x427fd4 in _start (/jerryscript/0805/bin/jerry+0x427fd4)
0x0000012211fc is located 4 bytes to the left of global variable 'jerry_global_heap' defined in '/jerryscript/jerry-core/jcontext/jcontext.c:148:13' (0x1221200) of size 524288
0x0000012211fc is located 1108 bytes to the right of global variable 'jerry_global_context' defined in '/jerryscript/jerry-core/jcontext/jcontext.c:135:17' (0x121fc40) of size 4456
SUMMARY: AddressSanitizer: global-buffer-overflow /jerryscript/jerry-core/parser/js/js-scanner-util.c:2922:44 in scanner_literal_is_created
Shadow bytes around the buggy address:
0x00008023c1e0: f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9
0x00008023c1f0: f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9
0x00008023c200: f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9
0x00008023c210: f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9
0x00008023c220: f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9
=>0x00008023c230: f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9[f9]
0x00008023c240: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x00008023c250: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x00008023c260: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x00008023c270: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x00008023c280: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Container overflow: fc
Array cookie: ac
Intra object redzone: bb
ASan internal: fe
Left alloca redzone: ca
Right alloca redzone: cb
==880670==ABORTING
``` | global-buffer-overflow in scanner_literal_is_created | https://api.github.com/repos/jerryscript-project/jerryscript/issues/5151/comments | 0 | 2024-08-05T08:43:32Z | 2024-08-05T08:43:32Z | https://github.com/jerryscript-project/jerryscript/issues/5151 | 2,447,967,487 | 5,151 |
[
"jerryscript-project",
"jerryscript"
]
| ###### Commit ID
2dbb6f79efa08767ce44fbc8e3f26e80649295d7
###### Build platform
Ubuntu 22.04.3
###### Build steps
```sh
python3 ./tools/build.py --builddir=xxx --clean --compile-flag=-fsanitize=address --compile-flag=-g --strip=off --lto=off --logging=on --line-info=on --error-message=on --stack-limit=20
```
###### Test case
```sh
class JSEtest {
#async #async(x = 1) { "use strict" }
}
```
###### Execution steps
```sh
./jerry poc.js
```
###### Output
```sh
AddressSanitizer:DEADLYSIGNAL
=================================================================
==200353==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000008 (pc 0x0000007afb58 bp 0x7fffe0b4a1b0 sp 0x7fffe0b49e80 T0)
==200353==The signal is caused by a READ memory access.
==200353==Hint: address points to the zero page.
#0 0x7afb58 in parser_parse_unary_expression /jerryscript/jerry-core/parser/js/js-parser-expr.c:1997:11
#1 0x7afb58 in parser_parse_expression /jerryscript/jerry-core/parser/js/js-parser-expr.c:4118:9
#2 0x64ad0d in parser_parse_function_arguments /jerryscript/jerry-core/parser/js/js-parser.c:1797:7
#3 0x647b83 in parser_parse_function /jerryscript/jerry-core/parser/js/js-parser.c:2685:3
#4 0x79eec2 in lexer_construct_function_object /jerryscript/jerry-core/parser/js/js-lexer.c:2695:23
#5 0x7aa79e in parser_parse_class_body /jerryscript/jerry-core/parser/js/js-parser-expr.c:911:39
#6 0x7aa79e in parser_parse_class /jerryscript/jerry-core/parser/js/js-parser-expr.c:1113:27
#7 0x7dabc6 in parser_parse_statements /jerryscript/jerry-core/parser/js/js-parser-statm.c:2787:9
#8 0x663433 in parser_parse_source /jerryscript/jerry-core/parser/js/js-parser.c:2280:5
#9 0x6611ca in parser_parse_script /jerryscript/jerry-core/parser/js/js-parser.c:3332:38
#10 0x4ec611 in jerry_parse_common /jerryscript/jerry-core/api/jerryscript.c:418:21
#11 0x4ec23e in jerry_parse /jerryscript/jerry-core/api/jerryscript.c:486:10
#12 0x80402d in jerryx_source_parse_script /jerryscript/jerry-ext/util/sources.c:52:26
#13 0x80432c in jerryx_source_exec_script /jerryscript/jerry-ext/util/sources.c:63:26
#14 0x4e0160 in main /jerryscript/jerry-main/main-desktop.c:156:20
#15 0x7fc0d0047d8f (/lib/x86_64-linux-gnu/libc.so.6+0x29d8f)
#16 0x7fc0d0047e3f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e3f)
#17 0x427fd4 in _start (/jerryscript/0805/bin/jerry+0x427fd4)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /jerryscript/jerry-core/parser/js/js-parser-expr.c:1997:11 in parser_parse_unary_expression
==200353==ABORTIN
``` | SEGV /jerryscript/jerry-core/parser/js/js-parser-expr.c:1997:11 in parser_parse_unary_expression | https://api.github.com/repos/jerryscript-project/jerryscript/issues/5150/comments | 0 | 2024-08-05T07:07:40Z | 2024-08-05T07:07:40Z | https://github.com/jerryscript-project/jerryscript/issues/5150 | 2,447,782,201 | 5,150 |
[
"jerryscript-project",
"jerryscript"
]
| ###### Commit ID
2dbb6f79efa08767ce44fbc8e3f26e80649295d7
###### Build platform
Ubuntu 22.04.3
###### Build steps
```sh
python3 ./tools/build.py --builddir=xxx --clean --compile-flag=-fsanitize=address --compile-flag=-g --strip=off --lto=off --logging=on --line-info=on --error-message=on --stack-limit=20
```
###### Test case
```sh
class C { async#* eval(v20) (
```
###### Execution steps
```sh
./jerry poc.js
```
###### Output
```sh
AddressSanitizer:DEADLYSIGNAL
=================================================================
==200325==ERROR: AddressSanitizer: SEGV on unknown address (pc 0x00000067e7cb bp 0x7fffdb52ecf0 sp 0x7fffdb52eb50 T0)
==200325==The signal is caused by a READ memory access.
==200325==Hint: this fault was caused by a dereference of a high value address (see register values below). Disassemble the provided pc to learn which register was used.
#0 0x67e7cb in scanner_literal_is_created /jerryscript/jerry-core/parser/js/js-scanner-util.c:2922:44
#1 0x64ade6 in parser_parse_function_arguments /jerryscript/jerry-core/parser/js/js-parser.c:1836:11
#2 0x647b83 in parser_parse_function /jerryscript/jerry-core/parser/js/js-parser.c:2685:3
#3 0x79eec2 in lexer_construct_function_object /jerryscript/jerry-core/parser/js/js-lexer.c:2695:23
#4 0x7aa79e in parser_parse_class_body /jerryscript/jerry-core/parser/js/js-parser-expr.c:911:39
#5 0x7aa79e in parser_parse_class /jerryscript/jerry-core/parser/js/js-parser-expr.c:1113:27
#6 0x7dabc6 in parser_parse_statements /jerryscript/jerry-core/parser/js/js-parser-statm.c:2787:9
#7 0x663433 in parser_parse_source /jerryscript/jerry-core/parser/js/js-parser.c:2280:5
#8 0x6611ca in parser_parse_script /jerryscript/jerry-core/parser/js/js-parser.c:3332:38
#9 0x4ec611 in jerry_parse_common /jerryscript/jerry-core/api/jerryscript.c:418:21
#10 0x4ec23e in jerry_parse /jerryscript/jerry-core/api/jerryscript.c:486:10
#11 0x80402d in jerryx_source_parse_script /jerryscript/jerry-ext/util/sources.c:52:26
#12 0x80432c in jerryx_source_exec_script /jerryscript/jerry-ext/util/sources.c:63:26
#13 0x4e0160 in main /jerryscript/jerry-main/main-desktop.c:156:20
#14 0x7f547bfe3d8f (/lib/x86_64-linux-gnu/libc.so.6+0x29d8f)
#15 0x7f547bfe3e3f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e3f)
#16 0x427fd4 in _start (/jerryscript/0805/bin/jerry+0x427fd4)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /jerryscript/jerry-core/parser/js/js-scanner-util.c:2922:44 in scanner_literal_is_created
==200325==ABORTING
``` | SEGV /jerryscript/jerry-core/parser/js/js-scanner-util.c:2922:44 in scanner_literal_is_created | https://api.github.com/repos/jerryscript-project/jerryscript/issues/5149/comments | 0 | 2024-08-05T07:05:16Z | 2024-08-06T03:59:56Z | https://github.com/jerryscript-project/jerryscript/issues/5149 | 2,447,777,835 | 5,149 |
[
"jerryscript-project",
"jerryscript"
]
| Since the module implementation has already changed in the master branch, this bug may only occur in the old 2.4.0 version.
I suggest releasing a new version to prevent people from encountering this issue.
###### JerryScript revision
https://github.com/jerryscript-project/jerryscript/releases/tag/v2.4.0
###### Build platform
esp-idf
###### Build steps
Using customized CMakeLists to build.
###### Build log
System malloc ON.
###### Test case
Using `import` to import native modules.
###### Output
Memory corruption in GC, usually crashes at `ecma_module_release_module_names`.
###### Backtrace
```
#0 ecma_module_release_module_names (module_name_p=0x1a)
at components/jerryscript/jerry-core/ecma/base/ecma-module.c:1062
#1 0x401342f5 in ecma_module_release_module_nodes (module_node_p=0x3fff4e80)
at components/jerryscript/jerry-core/ecma/base/ecma-module.c:1084
#2 0x40134332 in ecma_module_release_module (module_p=0x3fff4048)
at components/jerryscript/jerry-core/ecma/base/ecma-module.c:1121
#3 0x40134386 in ecma_module_cleanup (head_p=<optimized out>)
at components/jerryscript/jerry-core/ecma/base/ecma-module.c:1161
#4 0x4012f000 in ecma_gc_free_object (object_p=0x3fff3ba8)
at components/jerryscript/jerry-core/ecma/base/ecma-gc.c:1650
#5 0x4012f1cb in ecma_gc_run () at components/jerryscript/jerry-core/ecma/base/ecma-gc.c:1928
#6 0x4012d709 in jerry_gc (mode=JERRY_GC_PRESSURE_LOW)
```
###### Expected behavior
Not to crash.
###### Bug analysis
1. `ecma_module_find_native_module` passes argument `pass_p` to `ecma_module_create_module`
2. `parser_module_handle_module_specifier` releases the `name_p` after `ecma_module_find_native_module` returns
3. `name_p`(stored in `module_p->path_p`) is released in `ecma_module_release_module` during GC
###### Fix
```diff
diff --git a/jerry-core/ecma/base/ecma-module.c b/jerry-core/ecma/base/ecma-module.c
index 641649c3..0d1f1bd9 100644
--- a/jerry-core/ecma/base/ecma-module.c
+++ b/jerry-core/ecma/base/ecma-module.c
@@ -184,6 +184,7 @@ ecma_module_find_native_module (ecma_string_t *const path_p)
{
JERRY_ASSERT (ecma_is_value_object (native));
+ ecma_ref_ecma_string(path_p);
module_p = ecma_module_create_module (path_p);
module_p->state = ECMA_MODULE_STATE_NATIVE;
module_p->namespace_object_p = ecma_get_object_from_value (native);
```
| String double free in ecma_module_find_module | https://api.github.com/repos/jerryscript-project/jerryscript/issues/5143/comments | 0 | 2024-05-19T06:04:54Z | 2024-05-19T06:04:54Z | https://github.com/jerryscript-project/jerryscript/issues/5143 | 2,304,449,033 | 5,143 |
[
"jerryscript-project",
"jerryscript"
]
| ###### Commit ID
47bd5d4b910a41fdc517e39edcf9220d8030a61f
###### Build platform
Ubuntu 22.04.3
###### Build steps
```sh
python3 ./tools/build.py --builddir=xxx --debug --clean --compile-flag=-fsanitize=address --compile-flag=-g --strip=off --lto=off --logging=on --line-info=on --error-message=on --stack-limit=20
```
###### Test case
```sh
class C { #get [Symbol]; }
```
###### Execution steps
```sh
./jerry poc.js
```
###### Output
```sh
Debug:
ICE: Assertion 'context_p->token.type == LEXER_LITERAL' failed at /jerryscript/jerry-core/parser/js/js-parser-expr.c(parser_check_duplicated_private_field):408.
Error: JERRY_FATAL_FAILED_ASSERTION
pwndbg> bt
#0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=140737350398144) at ./nptl/pthread_kill.c:44
#1 __pthread_kill_internal (signo=6, threadid=140737350398144) at ./nptl/pthread_kill.c:78
#2 __GI___pthread_kill (threadid=140737350398144, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
#3 0x00007ffff7cb2476 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#4 0x00007ffff7c987f3 in __GI_abort () at ./stdlib/abort.c:79
#5 0x0000555555874565 in jerry_port_fatal (code=code@entry=JERRY_FATAL_FAILED_ASSERTION) at /jerryscript/jerry-port/common/jerry-port-process.c:29
#6 0x00005555557624d8 in jerry_fatal (code=code@entry=JERRY_FATAL_FAILED_ASSERTION) at /jerryscript/jerry-core/jrt/jrt-fatals.c:63
#7 0x000055555576238c in jerry_assert_fail (assertion=<optimized out>, file=<optimized out>, function=<optimized out>, line=line@entry=408) at /jerryscript/jerry-core/jrt/jrt-fatals.c:83
#8 0x0000555555848162 in parser_check_duplicated_private_field (context_p=context_p@entry=0x7fffffffde60, opts=<optimized out>) at /jerryscript/jerry-core/parser/js/js-parser-expr.c:408
#9 0x00005555558397df in parser_parse_class_body (context_p=0x7fffffffde60, opts=PARSER_CLASS_LITERAL_NO_OPTS, class_name_index=<optimized out>) at /jerryscript/jerry-core/parser/js/js-parser-expr.c:591
#10 parser_parse_class (context_p=0x7fffffffde60, is_statement=<optimized out>) at /jerryscript/jerry-core/parser/js/js-parser-expr.c:1110
#11 0x0000555555859f25 in parser_parse_statements (context_p=0x7fffffffde60) at /jerryscript/jerry-core/parser/js/js-parser-statm.c:2787
#12 0x000055555577c186 in parser_parse_source (source_p=source_p@entry=0x7ffff5e00aa0, parse_opts=parse_opts@entry=0, options_p=options_p@entry=0x7ffff5f00830) at /jerryscript/jerry-core/parser/js/js-parser.c:2280
#13 0x000055555577a501 in parser_parse_script (source_p=0x377884, source_p@entry=0x7ffff5e00aa0, parse_opts=3635332, parse_opts@entry=0, options_p=0x6, options_p@entry=0x7ffff5f00830) at /jerryscript/jerry-core/parser/js/js-parser.c:3332
#14 0x000055555568d3ca in jerry_parse_common (source_p=0x7ffff5e00aa0, options_p=options_p@entry=0x7ffff5f00830, parse_opts=parse_opts@entry=0) at /jerryscript/jerry-core/api/jerryscript.c:418
#15 0x000055555568d22c in jerry_parse (source_p=<optimized out>, source_size=<optimized out>, options_p=<optimized out>) at /jerryscript/jerry-core/api/jerryscript.c:486
#16 0x0000555555872ad2 in jerryx_source_parse_script (path_p=<optimized out>) at /jerryscript/jerry-ext/util/sources.c:52
#17 0x0000555555872cc4 in jerryx_source_exec_script (path_p=0x377884 <error: Cannot access memory at address 0x377884>) at /jerryscript/jerry-ext/util/sources.c:63
#18 0x00005555556860bc in main (argc=2, argv=<optimized out>) at /jerryscript/jerry-main/main-desktop.c:156
#19 0x00007ffff7c99d90 in __libc_start_call_main (main=main@entry=0x555555685a60 <main>, argc=argc@entry=2, argv=argv@entry=0x7fffffffe658) at ../sysdeps/nptl/libc_start_call_main.h:58
#20 0x00007ffff7c99e40 in __libc_start_main_impl (main=0x555555685a60 <main>, argc=2, argv=0x7fffffffe658, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffe648) at ../csu/libc-start.c:392
#21 0x00005555555c5ed5 in _start ()
``` | Assertion in parser_check_duplicated_private_field | https://api.github.com/repos/jerryscript-project/jerryscript/issues/5141/comments | 0 | 2024-05-16T11:06:09Z | 2024-06-18T18:00:08Z | https://github.com/jerryscript-project/jerryscript/issues/5141 | 2,300,099,592 | 5,141 |
[
"jerryscript-project",
"jerryscript"
]
| ###### JerryScript revision
47bd5d4b910a41fdc517e39edcf9220d8030a61f
###### Build platform
Ubuntu 22.04.3 LTS (Linux 5.19.17 x86_64)
###### Build steps
python3 ./tools/build.py --clean --debug --compile-flag=-fsanitize=address --compile-flag=-m32 --compile-flag=-g --strip=off --lto=off --logging=on --line-info=on --error-message=on --system-allocator=on --stack-limit=20
###### Test case
```javascript
class C1 extends Array{
#test() {
}
}
new C1();
```
###### Output
ICE: Assertion 'ecma_is_lexical_environment (obj_p) || !ecma_op_object_is_fast_array (obj_p)' failed at /home/lily/Desktop/12-vul-analysis/lastest-jerryscript/jerryscript/jerry-core/ecma/base/ecma-helpers.c(ecma_find_named_property):614.
Error: JERRY_FATAL_FAILED_ASSERTION
Aborted (core dumped)
###### Backtrace
```sh
Program received signal SIGABRT, Aborted.
0xf7fc4549 in __kernel_vsyscall ()
(gdb) bt
#0 0xf7fc4549 in __kernel_vsyscall ()
#1 0xf7487eb7 in ?? () from /lib32/libc.so.6
#2 0xf74374c5 in raise () from /lib32/libc.so.6
#3 0xf74203ac in abort () from /lib32/libc.so.6
#4 0x56738951 in jerry_port_fatal (code=JERRY_FATAL_FAILED_ASSERTION) at /home/ubuntu/Desktop/lastest-jerryscript/jerryscript/jerry-port/common/jerry-port-process.c:29
#5 0x56632fe4 in jerry_fatal (code=JERRY_FATAL_FAILED_ASSERTION) at/home/ubuntu/Desktop/lastest-jerryscript/jerryscript/jerry-core/jrt/jrt-fatals.c:63
#6 0x56633025 in jerry_assert_fail (assertion=0x5674bae0 "ecma_is_lexical_environment (obj_p) || !ecma_op_object_is_fast_array (obj_p)",
file=0x5674af60 "/home/ubuntu/Desktop/lastest-jerryscript/jerryscript/jerry-core/ecma/base/ecma-helpers.c", function=0x5674c9e0 <__func__.22> "ecma_find_named_property", line=614)
at /home/ubuntu/Desktop/lastest-jerryscript/jerryscript/jerry-core/jrt/jrt-fatals.c:83
#7 0x565b6b77 in ecma_find_named_property (obj_p=0xf4e006a0, name_p=0xf5600510) at/home/ubuntu/Desktop/lastest-jerryscript/jerryscript/jerry-core/ecma/base/ecma-helpers.c:614
#8 0x5667a49b in opfunc_private_method_or_accessor_add (class_object_p=0xf4e00820, this_obj_p=0xf4e006a0, static_flag=0)
at /home/ubuntu/Desktop/lastest-jerryscript/jerryscript/jerry-core/vm/opcodes.c:919
#9 0x5667aa46 in opfunc_init_class_fields (class_object_p=0xf4e00820, this_val=4108322467) at /home/ubuntu/Desktop/lastest-jerryscript/jerryscript/jerry-core/vm/opcodes.c:1002
#10 0x565fade0 in ecma_op_function_construct_constructor (func_obj_p=0xf4e00820, new_target_p=0xf4e00820, arguments_list_p=0xffffcaec, arguments_list_len=0)
at /home/ubuntu/Desktop/lastest-jerryscript/jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1644
#11 0x565fb0ba in ecma_op_function_construct (func_obj_p=0xf4e00820, new_target_p=0xf4e00820, arguments_list_p=0xffffcaec, arguments_list_len=0)
at /home/ubuntu/Desktop/lastest-jerryscript/jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1735
#12 0x566859a9 in opfunc_construct (frame_ctx_p=0xffffcac0) at /home/ubuntu/Desktop/lastest-jerryscript/jerryscript/jerry-core/vm/vm.c:840
#13 0x566a48e3 in vm_execute (frame_ctx_p=0xffffcac0) at/home/ubuntu/Desktop/lastest-jerryscript/jerryscript/jerry-core/vm/vm.c:5236
#14 0x566a4f0d in vm_run (shared_p=0xffffcbf0, this_binding_value=4110433411, lex_env_p=0xf5600590) at /home/ubuntu/Desktop/lastest-jerryscript/jerryscript/jerry-core/vm/vm.c:5312
#15 0x56683480 in vm_run_global (bytecode_p=0xf44019f0, function_object_p=0xf4e008e0) at /home/ubuntu/Desktop/lastest-jerryscript/jerryscript/jerry-core/vm/vm.c:286
#16 0x5657d5f3 in jerry_run (script=4108323043) at /home/ubuntu/Desktop/lastest-jerryscript/jerryscript/jerry-core/api/jerryscript.c:554
#17 0x567376c3 in jerryx_source_exec_script (path_p=0xffffd14a "test.js") at /home/ubuntu/Desktop/lastest-jerryscript/jerryscript/jerry-ext/util/sources.c:68
#18 0x56578153 in main (argc=2, argv=0xffffcf24) at /home/ubuntu/Desktop/lastest-jerryscript/jerryscript/jerry-main/main-desktop.c:156
```
| Missing private field support for the Array object | https://api.github.com/repos/jerryscript-project/jerryscript/issues/5138/comments | 0 | 2024-04-20T06:45:22Z | 2024-04-20T06:45:54Z | https://github.com/jerryscript-project/jerryscript/issues/5138 | 2,254,415,827 | 5,138 |
[
"jerryscript-project",
"jerryscript"
]
| JERRYX_UNUSED(call_info_p);
int16_t x=1;
int16_t y=2;
uint8_t bitmap;// *WARNNING** need to check BUFFERSIZE
char buf[32];// *WARNNING* need to check BUFFERSIZE
int16_t w=3;
int16_t h=4;
uint16_t color=1;
uint16_t bg=0;
const jerryx_arg_t mapping[] ={
jerryx_arg_int16(&x, JERRYX_ARG_CEIL, JERRYX_ARG_NO_CLAMP, JERRYX_ARG_NO_COERCE, JERRYX_ARG_REQUIRED),
jerryx_arg_int16(&y, JERRYX_ARG_CEIL, JERRYX_ARG_NO_CLAMP, JERRYX_ARG_NO_COERCE, JERRYX_ARG_REQUIRED),
jerryx_arg_ignore(), // TODO process bitmap pointer later
jerryx_arg_int16(&w, JERRYX_ARG_CEIL, JERRYX_ARG_NO_CLAMP, JERRYX_ARG_NO_COERCE, JERRYX_ARG_REQUIRED),
jerryx_arg_int16(&h, JERRYX_ARG_CEIL, JERRYX_ARG_NO_CLAMP, JERRYX_ARG_NO_COERCE, JERRYX_ARG_REQUIRED),
jerryx_arg_uint16(&color, JERRYX_ARG_CEIL, JERRYX_ARG_NO_CLAMP, JERRYX_ARG_NO_COERCE, JERRYX_ARG_REQUIRED),
jerryx_arg_uint16(&bg, JERRYX_ARG_CEIL, JERRYX_ARG_NO_CLAMP, JERRYX_ARG_NO_COERCE, JERRYX_ARG_OPTIONAL),
};
jerry_value_t rv = jerryx_arg_transform_args(args_p, 7, mapping, 2);
if (jerry_value_is_exception(rv)){
WSDEBUG_TPRINTF("[sd1306] drawBitmap mapping Error argc(%d) %x\n",args_cnt,rv);
WSDEBUG_TPRINTF("[sd1306] x%d y%d w%d h%d color%d bg%d \n",x,y,w,h,color,bg);
return rv;
}
Temporary solution to mapping 2items then mapping last 4 items separately.
root cause the jerryx_arg_transform_ignore did not use (void) js_arg_iter_p; / unused /
to skip one args_p item. | jerryx_arg_ignore fail | https://api.github.com/repos/jerryscript-project/jerryscript/issues/5137/comments | 0 | 2024-04-14T19:24:27Z | 2024-04-14T19:34:11Z | https://github.com/jerryscript-project/jerryscript/issues/5137 | 2,242,324,732 | 5,137 |
[
"jerryscript-project",
"jerryscript"
]
| ###### JerryScript revision
cefd391772529c8a9531d7b3c244d78d38be47c6
###### Build platform
Ubuntu 22.04.3
###### Build steps
```sh
python ./tools/build.py --builddir=xxx --debug --clean --compile-flag=-fsanitize=address --compile-flag=-g --strip=off --lto=off --logging=on --line-info=on --error-message=on --stack-limit=20
```
###### Test case
```sh
//poc1.js
class s { constructor ( ) { } [ { [idx1] : { [{ [idx1] : { [idx2] : {}}} = [5.7]] : {}}} = [5.7] ] = class { } }
new s ( ) ;
```
```sh
//poc2.js
const obj = { a : (o) = 1 };
var a = { a : (o) = 1 } = obj;
(class C2 { ["foo"] = 5; ["foo"] = {} + {} })((new (class o { ["foo"] = 5; [{ a : (o) = 1 } = obj] = {} + {} })).foo === 5);
print(o === 1);
```
###### Execution steps
```sh
./xxx/bin/jerry poc.js
```
###### Output
```sh
//poc1.js
Unhandled exception: ReferenceError: idx1 is not defined
ICE: Assertion 'ECMA_STRING_IS_REF_EQUALS_TO_ONE (string_p)' failed at /home/qbtly/Desktop/target/jerryscript/jerry-core/ecma/base/ecma-literal-storage.c(ecma_free_string_list):75.
Error: JERRY_FATAL_FAILED_ASSERTION
```
```sh
//poc2.js
Unhandled exception: ReferenceError: Variables declared by let/const must be initial
ICE: Assertion 'ECMA_STRING_IS_REF_EQUALS_TO_ONE (string_p)' failed at /home/qbtly/Desktop/target/jerryscript/jerry-core/ecma/base/ecma-literal-storage.c(ecma_free_string_list):75.
Error: JERRY_FATAL_FAILED_ASSERTION
``` | Assertion ECMA_STRING_IS_REF_EQUALS_TO_ONE (string_p) in ecma_free_string_list | https://api.github.com/repos/jerryscript-project/jerryscript/issues/5135/comments | 0 | 2024-03-26T09:16:48Z | 2024-04-02T14:50:04Z | https://github.com/jerryscript-project/jerryscript/issues/5135 | 2,207,672,144 | 5,135 |
[
"jerryscript-project",
"jerryscript"
]
| ###### JerryScript revision
cefd391772529c8a9531d7b3c244d78d38be47c6
###### Build platform
Ubuntu 22.04.3
###### Build steps
```sh
python ./tools/build.py --builddir=xxx --clean --compile-flag=-fsanitize=address --compile-flag=-g --strip=off --lto=off --logging=on --line-info=on --error-message=on --stack-limit=20
```
###### Test case
```sh
import{a as "\{{91406,456}"
```
###### Execution steps
```sh
./xxx/bin/jerry poc.js
```
###### Output
```sh
Release:
=================================================================
==2144424==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60300000005c at pc 0x559a32bf48a3 bp 0x7ffedf4f4450 sp 0x7ffedf4f4448
READ of size 1 at 0x60300000005c thread T0
#0 0x559a32bf48a2 in lexer_convert_ident_to_cesu8 /jerryscript/jerry-core/parser/js/js-lexer.c:2083:9
#1 0x559a32bf4e08 in lexer_convert_literal_to_chars /jerryscript/jerry-core/parser/js/js-lexer.c:2133:5
#2 0x559a32bf5d19 in lexer_construct_literal_object /jerryscript/jerry-core/parser/js/js-lexer.c:2367:5
#3 0x559a32b707db in scanner_check_variables /jerryscript/jerry-core/parser/js/js-scanner-util.c:2279:5
#4 0x559a32b67485 in parser_parse_source /jerryscript/jerry-core/parser/js/js-parser.c:2274:9
#5 0x559a32b65924 in parser_parse_script /jerryscript/jerry-core/parser/js/js-parser.c:3332:38
#6 0x559a32ac2f38 in jerry_parse_common /jerryscript/jerry-core/api/jerryscript.c:418:21
#7 0x559a32ac2d34 in jerry_parse /jerryscript/jerry-core/api/jerryscript.c:486:10
#8 0x559a32c2876f in jerryx_source_parse_script /jerryscript/jerry-ext/util/sources.c:52:26
#9 0x559a32c2892f in jerryx_source_exec_script /jerryscript/jerry-ext/util/sources.c:63:26
#10 0x559a32abe5b2 in main /jerryscript/jerry-main/main-desktop.c:156:20
#11 0x7f10bf46dd8f in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16
#12 0x7f10bf46de3f in __libc_start_main csu/../csu/libc-start.c:392:3
#13 0x559a329fe424 in _start (/jerryscript/0323re/bin/jerry+0x41424) (BuildId: efa40b4121fb9ed9276f89fc661eef85c730ab65)
0x60300000005c is located 0 bytes to the right of 28-byte region [0x603000000040,0x60300000005c)
allocated by thread T0 here:
#0 0x559a32a83e4e in __interceptor_malloc (/jerryscript/0323re/bin/jerry+0xc6e4e) (BuildId: efa40b4121fb9ed9276f89fc661eef85c730ab65)
#1 0x559a32c297f6 in jerry_port_source_read /jerryscript/jerry-port/common/jerry-port-fs.c:72:45
#2 0x559a32c2866d in jerryx_source_parse_script /jerryscript/jerry-ext/util/sources.c:33:28
#3 0x559a32c2892f in jerryx_source_exec_script /jerryscript/jerry-ext/util/sources.c:63:26
SUMMARY: AddressSanitizer: heap-buffer-overflow /jerryscript/jerry-core/parser/js/js-lexer.c:2083:9 in lexer_convert_ident_to_cesu8
Shadow bytes around the buggy address:
0x0c067fff7fb0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c067fff7fc0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c067fff7fd0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c067fff7fe0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c067fff7ff0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x0c067fff8000: fa fa 00 00 00 fa fa fa 00 00 00[04]fa fa fa fa
0x0c067fff8010: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c067fff8020: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c067fff8030: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c067fff8040: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c067fff8050: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Container overflow: fc
Array cookie: ac
Intra object redzone: bb
ASan internal: fe
Left alloca redzone: ca
Right alloca redzone: cb
==2144424==ABORTING
```
```sh
Debug:
ICE: Assertion '(byte >= LIT_CHAR_LOWERCASE_A && byte <= LIT_CHAR_LOWERCASE_F) || (byte >= LIT_CHAR_UPPERCASE_A && byte <= LIT_CHAR_UPPERCASE_F)' failed at /jerryscript/jerry-core/parser/js/js-lexer.c(lexer_unchecked_hex_to_character):178.
Error: JERRY_FATAL_FAILED_ASSERTION
Aborted
```
| Heap-Buffer-Overflow in lexer_convert_ident_to_cesu8 /jerryscript/jerry-core/parser/js/js-lexer.c:2083:9 | https://api.github.com/repos/jerryscript-project/jerryscript/issues/5134/comments | 0 | 2024-03-26T08:47:52Z | 2024-03-26T08:47:52Z | https://github.com/jerryscript-project/jerryscript/issues/5134 | 2,207,604,318 | 5,134 |
[
"jerryscript-project",
"jerryscript"
]
| ###### JerryScript revision
cefd391772529c8a9531d7b3c244d78d38be47c6
###### Build platform
Ubuntu 22.04.3
###### Build steps
```sh
python ./tools/build.py --builddir=xxx --clean --compile-flag=-fsanitize=address --compile-flag=-g --strip=off --lto=off --logging=on --line-info=on --error-message=on --stack-limit=20
```
###### Test case
```sh
function f(){return}
switch (1) {
case class extends c { static { } ; }:
break}
while (false) {continue}
```
###### Execution steps
```sh
./xxx/bin/jerry poc.js
```
###### Output
```sh
Program received signal SIGSEGV, Segmentation fault.
AddressSanitizer:DEADLYSIGNAL
=================================================================
==1654425==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000010 (pc 0x5615b924fb62 bp 0x7ffc42a950d0 sp 0x7ffc42a94f40 T0)
==1654425==The signal is caused by a WRITE memory access.
==1654425==Hint: address points to the zero page.
#0 0x5615b924fb62 in parser_parse_class /jerryscript/jerry-core/parser/js/js-parser-expr.c:1107:38
#1 0x5615b92536bf in parser_parse_unary_expression /jerryscript/jerry-core/parser/js/js-parser-expr.c:2217:7
#2 0x5615b92536bf in parser_parse_expression /jerryscript/jerry-core/parser/js/js-parser-expr.c:4115:9
#3 0x5615b927125e in parser_parse_case_statement /jerryscript/jerry-core/parser/js/js-parser-statm.c:2031:5
#4 0x5615b927125e in parser_parse_statements /jerryscript/jerry-core/parser/js/js-parser-statm.c:2909:9
#5 0x5615b9193185 in parser_parse_source /jerryscript/jerry-core/parser/js/js-parser.c:2280:5
#6 0x5615b9191500 in parser_parse_script /jerryscript/jerry-core/parser/js/js-parser.c:3332:38
#7 0x5615b90a43c9 in jerry_parse_common /jerryscript/jerry-core/api/jerryscript.c:418:21
#8 0x5615b90a422b in jerry_parse /jerryscript/jerry-core/api/jerryscript.c:486:10
#9 0x5615b9289ad1 in jerryx_source_parse_script /jerryscript/jerry-ext/util/sources.c:52:26
#10 0x5615b9289cc3 in jerryx_source_exec_script /jerryscript/jerry-ext/util/sources.c:63:26
#11 0x5615b909d0bb in main /jerryscript/jerry-main/main-desktop.c:156:20
#12 0x7f9c86e91d8f in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16
#13 0x7f9c86e91e3f in __libc_start_main csu/../csu/libc-start.c:392:3
#14 0x5615b8fdced4 in _start (/jerryscript/0321/bin/jerry+0x71ed4) (BuildId: 8a43acc73309945f9adb42dcffdcdab746b9ecc5)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /jerryscript/jerry-core/parser/js/js-parser-expr.c:1107:38 in parser_parse_class
==1654425==ABORTING
``` | SEGV in parser_parse_class /jerryscript/jerry-core/parser/js/js-parser-expr.c:1107:38 | https://api.github.com/repos/jerryscript-project/jerryscript/issues/5133/comments | 0 | 2024-03-26T08:05:18Z | 2024-03-26T08:06:55Z | https://github.com/jerryscript-project/jerryscript/issues/5133 | 2,207,524,504 | 5,133 |
[
"jerryscript-project",
"jerryscript"
]
| ###### JerryScript revision
cefd391772529c8a9531d7b3c244d78d38be47c6
###### Build platform
Ubuntu 22.04.3
###### Build steps
```sh
python ./tools/build.py --builddir=xxx --clean --compile-flag=-fsanitize=address --compile-flag=-g --strip=off --lto=off --logging=on --line-info=on --error-message=on --stack-limit=20
```
###### Test case
```sh
function f(){return}
switch (class extends c { static { } ; }) {
case 1:
break}
while (false) {continue}
```
###### Execution steps
```sh
./xxx/bin/jerry poc.js
```
###### Output
```sh
Release:
Program received signal SIGSEGV, Segmentation fault.
AddressSanitizer:DEADLYSIGNAL
=================================================================
==1362976==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000008 (pc 0x55e5d2682005 bp 0x7ffe140aa670 sp 0x7ffe140aa540 T0)
==1362976==The signal is caused by a READ memory access.
==1362976==Hint: address points to the zero page.
#0 0x55e5d2682005 in scanner_seek /jerryscript/jerry-core/parser/js/js-scanner-util.c:372:17
#1 0x55e5d273667e in parser_parse_switch_statement_start /jerryscript/jerry-core/parser/js/js-parser-statm.c:1714:5
#2 0x55e5d272d2d1 in parser_parse_statements /jerryscript/jerry-core/parser/js/js-parser-statm.c:2821:9
#3 0x55e5d267fdfd in parser_parse_source /jerryscript/jerry-core/parser/js/js-parser.c:2280:5
#4 0x55e5d267e924 in parser_parse_script /jerryscript/jerry-core/parser/js/js-parser.c:3332:38
#5 0x55e5d25dbf38 in jerry_parse_common /jerryscript/jerry-core/api/jerryscript.c:418:21
#6 0x55e5d25dbd34 in jerry_parse /jerryscript/jerry-core/api/jerryscript.c:486:10
#7 0x55e5d274176f in jerryx_source_parse_script /jerryscript/jerry-ext/util/sources.c:52:26
#8 0x55e5d274192f in jerryx_source_exec_script /jerryscript/jerry-ext/util/sources.c:63:26
#9 0x55e5d25d75b2 in main /jerryscript/jerry-main/main-desktop.c:156:20
#10 0x7f39cdf6ed8f in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16
#11 0x7f39cdf6ee3f in __libc_start_main csu/../csu/libc-start.c:392:3
#12 0x55e5d2517424 in _start (/jerryscript/0323re/bin/jerry+0x41424) (BuildId: efa40b4121fb9ed9276f89fc661eef85c730ab65)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /jerryscript/jerry-core/parser/js/js-scanner-util.c:372:17 in scanner_seek
==1362976==ABORTING
```
```sh
Debug:
ICE: Assertion 'context_p->next_scanner_info_p->source_p == context_p->source_p && context_p->next_scanner_info_p->type == SCANNER_TYPE_SWITCH' failed at /jerryscript/jerry-core/parser/js/js-parser-statm.c(parser_parse_switch_statement_start):1666.
Error: JERRY_FATAL_FAILED_ASSERTION
Program received signal SIGABRT, Aborted.
__pthread_kill_implementation (no_tid=0, signo=6, threadid=140737350406336) at ./nptl/pthread_kill.c:44
44 ./nptl/pthread_kill.c: No such file or directory.
``` | SEGV in scanner_seek /jerryscript/jerry-core/parser/js/js-scanner-util.c:372:17 | https://api.github.com/repos/jerryscript-project/jerryscript/issues/5132/comments | 0 | 2024-03-26T07:50:12Z | 2024-03-26T08:59:44Z | https://github.com/jerryscript-project/jerryscript/issues/5132 | 2,207,491,351 | 5,132 |
[
"jerryscript-project",
"jerryscript"
]
| I found a suspected memory leak defect at line 151 of the file /jerryscript/jerry-ext/util/sources.c using a static analysis tool. Below is the link to the detailed description of this defect:https://github.com/LuMingYinDetect/jerryscript_defects/blob/main/jerryscript_detect_1.md | A memory leak defect was identified at line 151 of the file /jerryscript/jerry-ext/util/sources.c. | https://api.github.com/repos/jerryscript-project/jerryscript/issues/5130/comments | 0 | 2024-03-14T00:39:19Z | 2024-03-14T00:39:19Z | https://github.com/jerryscript-project/jerryscript/issues/5130 | 2,185,159,666 | 5,130 |
[
"jerryscript-project",
"jerryscript"
]
| I can't persist the argument. It appears to be destroyed after the c method is executed, even though I used jerry value copy api
I want to persist the js callback argument received by the c native method and call it in another scope, but I can't access it properly in that other scope. The following is a simple example( function eventHandler is called afhter function initLoopEvent is called, and function eventHandler is called multiple times )
```c
static esp_err_t eventHandler(void* ctx, system_event_t* event) {
jerry_value_t initLoopEventCallback = *(jerry_value_t*)ctx;
if (jerry_value_is_function(initLoopEventCallback)) {
// false
// The program will never get here
} else {
// true
jerry_log(JERRY_LOG_LEVEL_ERROR, "initLoopEventCallback is not a function");
}
}
static jerry_value_t initLoopEvent(const jerry_call_info_t* call_info_p,
const jerry_value_t arguments[],
const jerry_length_t arguments_count) {
jerry_value_t callback = jerry_value_copy(arguments[0]);
error = validateFunction(callback);
if (isError(error)) {
jerry_log(JERRY_LOG_LEVEL_ERROR, "Invalid arguments[0]");
jerry_log(JERRY_LOG_LEVEL_ERROR, "Invalid function initLoopEvent");
return error;
}
// init evemt loop
ESP_ERROR_CHECK(esp_event_loop_init(eventHandler, &callback));
return jerry_undefined();
}
```
| How to ensure that arguments of c method are not destroyed after the execution of the function | https://api.github.com/repos/jerryscript-project/jerryscript/issues/5128/comments | 2 | 2024-02-11T14:50:05Z | 2024-02-12T06:40:54Z | https://github.com/jerryscript-project/jerryscript/issues/5128 | 2,129,019,062 | 5,128 |
[
"jerryscript-project",
"jerryscript"
]
| It seems the api documentation on github and on jerryscript.net are out of sync. For example: You can find documentaiton for `jerry_call` here https://github.com/jerryscript-project/jerryscript/blob/master/docs/02.API-REFERENCE.md#jerry_call, but this function is nowhere to be found on https://jerryscript.net/api-reference/. There are other examples as well. | Online API reference docs doesn't match github's. | https://api.github.com/repos/jerryscript-project/jerryscript/issues/5125/comments | 1 | 2024-02-02T18:36:23Z | 2024-02-07T10:05:21Z | https://github.com/jerryscript-project/jerryscript/issues/5125 | 2,115,538,810 | 5,125 |
[
"jerryscript-project",
"jerryscript"
]
| 👋 it has been couple of years since last release in 2021, would be good to make a new release including all the recent changes, thanks! | request a new release | https://api.github.com/repos/jerryscript-project/jerryscript/issues/5124/comments | 0 | 2024-01-21T06:40:34Z | 2024-01-21T06:40:34Z | https://github.com/jerryscript-project/jerryscript/issues/5124 | 2,092,447,652 | 5,124 |
[
"jerryscript-project",
"jerryscript"
]
| ###### JerryScript revision
ff9ff8f36c967890b5ebb240d9fa90d6e351aa01
###### Build platform
Ubuntu 22.04.3
###### Build steps
```sh
python ./tools/build.py --builddir=xxx --clean --debug --compile-flag=-fsanitize=address --compile-flag=-g --strip=off --lto=off --logging=on --line-info=on --error-message=on --stack-limit=20
```
###### Test case
```sh
var str = "ab";
var pattern = /a/;
str.split(pattern);
print(RegExp.rightContext);
```
###### Execution steps
```sh
./xxx/bin/jerry poc.js
```
###### Output
```sh
Jerryscript: undefined
V8: b
```
| RegExp.rightContext differs between Jerryscript and V8 | https://api.github.com/repos/jerryscript-project/jerryscript/issues/5123/comments | 0 | 2023-12-21T14:56:01Z | 2023-12-21T14:56:01Z | https://github.com/jerryscript-project/jerryscript/issues/5123 | 2,052,578,446 | 5,123 |
[
"jerryscript-project",
"jerryscript"
]
| ###### JerryScript revision
514fa6735a5d7ff3093571c921120e3487734be9
###### Build platform
Debian GNU/Linux 12 (bookworm) (Linux 6.1.0-15-amd64 x86_64)
###### Build steps
```sh
mkdir build && cmake -H. -Bbuild && make -C build
```
###### Build log
Irrelevant.
###### Test case
```javascript
`abc${Number}def`
```
###### Execution platform
Unnecessary if the same as the build platform.
###### Execution steps
Generate snapshot data with the `jerry_generate_snapshot` function, as instructed by https://github.com/jerryscript-project/jerryscript/blob/master/docs/02.API-REFERENCE.md#jerry_generate_snapshot
###### Output
`RangeError: Unsupported feature: tagged template literals`
###### Backtrace
None.
###### Expected behavior
Snapshot should be generated correctly.
| Snapshot doesn't support tagged template literals | https://api.github.com/repos/jerryscript-project/jerryscript/issues/5122/comments | 1 | 2023-12-18T20:53:36Z | 2023-12-18T20:56:23Z | https://github.com/jerryscript-project/jerryscript/issues/5122 | 2,047,436,142 | 5,122 |
[
"jerryscript-project",
"jerryscript"
]
| jerryScript version 3.0.0:
commit 05dbbd134c3b9e2482998f267857dd3722001cd7
Build platform:
Ubuntu 20.04
Build cmd:
```
python tools/build.py --debug --profile=es.next --lto=off --compile-flag=-D_POSIX_C_SOURCE=200809 --compile-flag=-Wno-strict-prototypes --stack-limit=15
```
Test case
```js
class Bar {
static {
var x = `
function foo() {
return arguments;
}
switch (x) {
}
`;
eval(x);
}
}
```
Error message:
```
ICE: Assertion 'context_p->next_scanner_info_p->source_p == context_p->source_p && context_p->next_scanner_info_p->type == SCANNER_TYPE_SWITCH' failed at jerry-core/parser/js/js-parser-statm.c(parser_parse_switch_statement_start):1665.
Error: JERRY_FATAL_FAILED_ASSERTION
Aborted (core dumped)
```
| Assertion 'context_p->next_scanner_info_p->source_p == context_p->source_p && context_p->next_scanner_info_p->type == SCANNER_TYPE_SWITCH' failed | https://api.github.com/repos/jerryscript-project/jerryscript/issues/5119/comments | 0 | 2023-12-01T08:34:16Z | 2024-06-03T11:43:20Z | https://github.com/jerryscript-project/jerryscript/issues/5119 | 2,020,377,218 | 5,119 |
[
"jerryscript-project",
"jerryscript"
]
|
jerryScript version 3.0.0:
commit 05dbbd134c3b9e2482998f267857dd3722001cd7
Build platform:
Ubuntu 20.04
Build cmd:
```
python tools/build.py --debug --profile=es.next --lto=off --compile-flag=-D_POSIX_C_SOURCE=200809 --compile-flag=-Wno-strict-prototypes --stack-limit=15
```
Test case
```js
function foo() {
return 0;
}
var obj = {};
function bar() {
function test() {
BigInt64Array.next = foo;
return BigInt64Array;
}
return test;
}
function baz(arg) {
return arg;
}
Object.defineProperty(obj, Symbol.iterator, { configurable: true, enumerable: true, get: bar, set: baz });
async function* trigger() {
yield* obj;
return obj;
}
trigger(foo, obj, Symbol, bar)["next"]();
```
Error message:
```
ICE: Assertion 'ecma_is_value_object (iter_result)' failed at jerry-core/ecma/operations/ecma-iterator-object.c(ecma_op_iterator_complete):411.
Error: JERRY_FATAL_FAILED_ASSERTION
Aborted (core dumped)
```
| Assertion 'ecma_is_value_object (iter_result)' failed | https://api.github.com/repos/jerryscript-project/jerryscript/issues/5118/comments | 0 | 2023-12-01T08:33:19Z | 2023-12-01T08:33:19Z | https://github.com/jerryscript-project/jerryscript/issues/5118 | 2,020,375,784 | 5,118 |
[
"jerryscript-project",
"jerryscript"
]
|
jerryScript version 3.0.0:
commit 05dbbd134c3b9e2482998f267857dd3722001cd7
Build platform:
Ubuntu 20.04
Build cmd:
```
python tools/build.py --debug --profile=es.next --lto=off --compile-flag=-D_POSIX_C_SOURCE=200809 --compile-flag=-Wno-strict-prototypes --stack-limit=15
```
Test case
```js
function foo() {
class Bar {
static {
var x = `
for (let i = 0, j = 10; i < j;) {
}
function baz() {
return arguments;
}
class Proto {
}
`;
eval(x);
}
}
return foo;
}
new Promise(foo);
```
Error message:
SEGV on debug version
```
Segmentation fault (core dumped)
```
Error messages in ASAN version:
```
AddressSanitizer:DEADLYSIGNAL
=================================================================
==3670588==ERROR: AddressSanitizer: SEGV on unknown address 0x00000008 (pc 0x5671dd80 bp 0xffa2bf18 sp 0xffa2be60 T0)
==3670588==The signal is caused by a READ memory access.
==3670588==Hint: address points to the zero page.
#0 0x5671dd7f in parser_parse_class jerry-core/parser/js/js-parser-expr.c:1107
#1 0x567421af in parser_parse_statements jerry-core/parser/js/js-parser-statm.c:2787
#2 0x56662c82 in parser_parse_source jerry-core/parser/js/js-parser.c:2280
#3 0x56668fb5 in parser_parse_script jerry-core/parser/js/js-parser.c:3326
#4 0x56614236 in ecma_op_eval_chars_buffer jerry-core/ecma/operations/ecma-eval.c:86
#5 0x5661415b in ecma_op_eval jerry-core/ecma/operations/ecma-eval.c:56
#6 0x566d8c14 in ecma_builtin_global_object_eval jerry-core/ecma/builtin-objects/ecma-builtin-global.c:109
#7 0x566da71e in ecma_builtin_global_dispatch_routine jerry-core/ecma/builtin-objects/ecma-builtin-global.c:594
#8 0x565f26de in ecma_builtin_dispatch_routine jerry-core/ecma/builtin-objects/ecma-builtins.c:1460
#9 0x565f28fb in ecma_builtin_dispatch_call jerry-core/ecma/builtin-objects/ecma-builtins.c:1489
#10 0x566184a8 in ecma_op_function_call_native_built_in jerry-core/ecma/operations/ecma-function-object.c:1217
#11 0x56618e8c in ecma_op_function_call jerry-core/ecma/operations/ecma-function-object.c:1411
#12 0x56618d91 in ecma_op_function_validated_call jerry-core/ecma/operations/ecma-function-object.c:1371
#13 0x566a03a5 in opfunc_call jerry-core/vm/vm.c:758
#14 0x566c08fe in vm_execute jerry-core/vm/vm.c:5217
#15 0x566c0f17 in vm_run jerry-core/vm/vm.c:5312
#16 0x566182ba in ecma_op_function_call_simple jerry-core/ecma/operations/ecma-function-object.c:1176
#17 0x56618e70 in ecma_op_function_call jerry-core/ecma/operations/ecma-function-object.c:1406
#18 0x566a7707 in vm_loop jerry-core/vm/vm.c:1794
#19 0x566c0899 in vm_execute jerry-core/vm/vm.c:5211
#20 0x566c0f17 in vm_run jerry-core/vm/vm.c:5312
#21 0x566967f4 in opfunc_init_static_class_fields jerry-core/vm/opcodes.c:1081
#22 0x566a9f4a in vm_loop jerry-core/vm/vm.c:2150
#23 0x566c0899 in vm_execute jerry-core/vm/vm.c:5211
#24 0x566c0f17 in vm_run jerry-core/vm/vm.c:5312
#25 0x566182ba in ecma_op_function_call_simple jerry-core/ecma/operations/ecma-function-object.c:1176
#26 0x56618e70 in ecma_op_function_call jerry-core/ecma/operations/ecma-function-object.c:1406
#27 0x5662f276 in ecma_promise_run_executor jerry-core/ecma/operations/ecma-promise-object.c:447
#28 0x5662f4dc in ecma_op_create_promise_object jerry-core/ecma/operations/ecma-promise-object.c:514
#29 0x566ec87f in ecma_builtin_promise_dispatch_construct jerry-core/ecma/builtin-objects/ecma-builtin-promise.c:476
#30 0x565f2ba9 in ecma_builtin_dispatch_construct jerry-core/ecma/builtin-objects/ecma-builtins.c:1518
#31 0x56619172 in ecma_op_function_construct_built_in jerry-core/ecma/operations/ecma-function-object.c:1537
#32 0x566196cf in ecma_op_function_construct jerry-core/ecma/operations/ecma-function-object.c:1717
#33 0x566a08f1 in opfunc_construct jerry-core/vm/vm.c:840
#34 0x566c093c in vm_execute jerry-core/vm/vm.c:5236
#35 0x566c0f17 in vm_run jerry-core/vm/vm.c:5312
#36 0x5669e5a3 in vm_run_global jerry-core/vm/vm.c:286
#37 0x565a2753 in jerry_run jerry-core/api/jerryscript.c:548
#38 0x5674f754 in jerryx_source_exec_script jerry-ext/util/sources.c:68
#39 0x5659d688 in main jerry-main/main-desktop.c:156
#40 0xf7653ed4 in __libc_start_main (/lib/i386-linux-gnu/libc.so.6+0x1aed4)
``` | Memory corruption in parser_parse_class | https://api.github.com/repos/jerryscript-project/jerryscript/issues/5117/comments | 0 | 2023-12-01T08:32:30Z | 2024-05-28T04:59:15Z | https://github.com/jerryscript-project/jerryscript/issues/5117 | 2,020,374,504 | 5,117 |
[
"jerryscript-project",
"jerryscript"
]
| It is very difficult to analyze the CBC without a analyse tool, which can map the CBC Macro definition and the CBC value。
I see the tool in the training document in IoT.js and Jerryscipt | Need a Bytecode Viewer, a tool to read Bytecode | https://api.github.com/repos/jerryscript-project/jerryscript/issues/5116/comments | 1 | 2023-11-30T01:44:54Z | 2023-11-30T05:23:04Z | https://github.com/jerryscript-project/jerryscript/issues/5116 | 2,017,717,243 | 5,116 |
[
"jerryscript-project",
"jerryscript"
]
| The following CI jobs have dependencies that cannot be satisfied on more recent versions of ubuntu than 18.04:
- MbedOS_K64F_Build_Test
- Requires the `gcc-arm-embedded` toolchain from the `ppa:team-gcc-arm-embedded/ppa` ppa, which only has packages for ubuntu 14.04, 16.04, and 18.04.
- Requires the `mbed-cli` which uses python features that were deprecated in version 3.3, and removed in 3.10 (ubuntu 22.04 ships python version 3.10)
- Requires gcc arm toolchain version >= 9 and < 10 (ubuntu 22.04 ships versions 10 and 11)
- RIOT_STM32F4_Build_Test
- It was also previously using `gcc-arm-embedded` toolchain from the `ppa:team-gcc-arm-embedded/ppa` ppa, but it does successfully build using `gcc-arm-none-eabi` from the ubuntu repos on top of ubuntu-latest, however I'm unsure about this being the right compiler for this target
If it is the right one, then it can be re-enabled with minimal changes to the `gh-actions.yml` configuration; however if it is not then it cannot be updated to a newer ubuntu version.
A possible workaround to make them work, since Github Actions dropped support for ubuntu 18.04 runners, is to use docker to run ubuntu 18.04 inside a container on top of ubuntu-latest: for as long as the ubuntu 18.04 repos and the docker image is available, they should continue to work, with some changes to the `gh-actions.yml` configuration.
Should we use this workaround, or is it not worth the trouble and added dependencies on docker images, and drop these tests?
| Not feasible to update some CI jobs to ubuntu 22.04 | https://api.github.com/repos/jerryscript-project/jerryscript/issues/5115/comments | 2 | 2023-11-29T13:53:43Z | 2023-12-15T11:35:17Z | https://github.com/jerryscript-project/jerryscript/issues/5115 | 2,016,648,128 | 5,115 |
[
"jerryscript-project",
"jerryscript"
]
| ###### JerryScript revision
ff9ff8f36c967890b5ebb240d9fa90d6e351aa01
###### Build platform
Ubuntu 22.04.3
###### Build steps
```sh
python ./tools/build.py --builddir=xxx --clean --debug --compile-flag=-fsanitize=address --compile-flag=-g --strip=off --lto=off --logging=on --line-info=on --error-message=on --stack-limit=20
```
###### Test case
```sh
function JSEtest() {
var a;
for (a[a = class b { }] = [ this ]; ;)
break;
}
with (JSEtest) { for ( const a = 0; a < 130; a++)
{
try { while (a < 3) {
var c = class extends constructor { static { } ; } ;
} } catch (err) { }
} }
```
###### Execution steps
```sh
./xxx/bin/jerry poc.js
```
###### Output(Debug)
```sh
ICE: Assertion 'block_found' failed at /jerryscript/jerry-core/parser/js/js-parser-statm.c(parser_parse_try_statement_end):1922.
Error: JERRY_FATAL_FAILED_ASSERTION
Aborted
```
###### Backtrace
```sh
Program received signal SIGABRT, Aborted.
__pthread_kill_implementation (no_tid=0, signo=6, threadid=140737350406336) at ./nptl/pthread_kill.c:44
44 ./nptl/pthread_kill.c: No such file or directory.
(gdb) bt
#0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=140737350406336) at ./nptl/pthread_kill.c:44
#1 __pthread_kill_internal (signo=6, threadid=140737350406336) at ./nptl/pthread_kill.c:78
#2 __GI___pthread_kill (threadid=140737350406336, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
#3 0x00007ffff7cb4476 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#4 0x00007ffff7c9a7f3 in __GI_abort () at ./stdlib/abort.c:79
#5 0x00005555558742f5 in jerry_port_fatal (code=code@entry=JERRY_FATAL_FAILED_ASSERTION) at /jerryscript/jerry-port/common/jerry-port-process.c:29
#6 0x00005555557623b8 in jerry_fatal (code=code@entry=JERRY_FATAL_FAILED_ASSERTION) at /jerryscript/jerry-core/jrt/jrt-fatals.c:63
#7 0x000055555576226c in jerry_assert_fail (assertion=<optimized out>, file=<optimized out>, function=<optimized out>, line=line@entry=1922) at /jerryscript/jerry-core/jrt/jrt-fatals.c:83
#8 0x000055555586106c in parser_parse_try_statement_end (context_p=0x7fffffffdd20) at /jerryscript/jerry-core/parser/js/js-parser-statm.c:1922
#9 parser_parse_statements (context_p=0x7fffffffdd20) at /jerryscript/jerry-core/parser/js/js-parser-statm.c:3132
#10 0x000055555577c016 in parser_parse_source (source_p=source_p@entry=0x7ffff5e00aa0, parse_opts=parse_opts@entry=0, options_p=options_p@entry=0x7ffff5f00830)
at /jerryscript/jerry-core/parser/js/js-parser.c:2280
#11 0x000055555577a391 in parser_parse_script (source_p=0x3ad128, source_p@entry=0x7ffff5e00aa0, parse_opts=3854632, parse_opts@entry=0, options_p=0x6, options_p@entry=0x7ffff5f00830)
at /jerryscript/jerry-core/parser/js/js-parser.c:3326
#12 0x000055555568d3ca in jerry_parse_common (source_p=0x7ffff5e00aa0, options_p=options_p@entry=0x7ffff5f00830, parse_opts=parse_opts@entry=0) at /jerryscript/jerry-core/api/jerryscript.c:412
#13 0x000055555568d22c in jerry_parse (source_p=<optimized out>, source_size=<optimized out>, options_p=<optimized out>) at /jerryscript/jerry-core/api/jerryscript.c:480
#14 0x0000555555872962 in jerryx_source_parse_script (path_p=<optimized out>) at /jerryscript/jerry-ext/util/sources.c:52
#15 0x0000555555872b54 in jerryx_source_exec_script (path_p=0x3ad128 <error: Cannot access memory at address 0x3ad128>) at /jerryscript/jerry-ext/util/sources.c:63
#16 0x00005555556860bc in main (argc=<optimized out>, argv=<optimized out>) at /jerryscript/jerry-main/main-desktop.c:156
```
###### Output(Release)
```sh
Program received signal SIGSEGV, Segmentation fault.
AddressSanitizer:DEADLYSIGNAL
=================================================================
==3586260==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000004 (pc 0x55eb8a697df2 bp 0x7ffc5c8bad00 sp 0x7ffc5c8bab00 T0)
==3586260==The signal is caused by a WRITE memory access.
==3586260==Hint: address points to the zero page.
#0 0x55eb8a697df2 in vm_loop /jerryscript/jerry-core/vm/vm.c:1648:55
#1 0x55eb8a68d287 in vm_execute /jerryscript/jerry-core/vm/vm.c:5211:37
#2 0x55eb8a68c1a1 in vm_run /jerryscript/jerry-core/vm/vm.c:5312:10
#3 0x55eb8a68bec8 in vm_run_global /jerryscript/jerry-core/vm/vm.c:286:25
#4 0x55eb8a5ba4c6 in jerry_run /jerryscript/jerry-core/api/jerryscript.c:554:24
#5 0x55eb8a71f984 in jerryx_source_exec_script /jerryscript/jerry-ext/util/sources.c:68:14
#6 0x55eb8a5b55b2 in main /jerryscript/jerry-main/main-desktop.c:156:20
#7 0x7f9cc50f9d8f in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16
#8 0x7f9cc50f9e3f in __libc_start_main csu/../csu/libc-start.c:392:3
#9 0x55eb8a4f5424 in _start (/jerryscript/0323re/bin/jerry+0x41424) (BuildId: efa40b4121fb9ed9276f89fc661eef85c730ab65)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /jerryscript/jerry-core/vm/vm.c:1648:55 in vm_loop
==3586260==ABORTING
```
| SEGV /jerryscript/jerry-core/vm/vm.c:1648:55 in vm_loop | https://api.github.com/repos/jerryscript-project/jerryscript/issues/5114/comments | 0 | 2023-11-23T03:57:03Z | 2024-06-18T18:02:50Z | https://github.com/jerryscript-project/jerryscript/issues/5114 | 2,007,446,629 | 5,114 |
[
"jerryscript-project",
"jerryscript"
]
| ###### JerryScript revision
ff9ff8f36c967890b5ebb240d9fa90d6e351aa01
###### Build platform
Ubuntu 22.04.3
###### Build steps
```sh
python ./tools/build.py --builddir=xxx --clean --debug --compile-flag=-fsanitize=address --compile-flag=-g --strip=off --lto=off --logging=on --line-info=on --error-message=on --stack-limit=20
```
###### Test case
```sh
class JSEtest {
#async [ class { [ 1 ] = class { constructor ( ) { } apply ; } ; } ]
}
```
###### Execution steps
```sh
./xxx/bin/jerry poc.js
```
###### Output
```sh
ICE: Assertion 'opts & PARSER_CLASS_LITERAL_CTOR_PRESENT' failed at /jerryscript/jerry-core/parser/js/js-parser-expr.c(parser_parse_class_body):538.
Error: JERRY_FATAL_FAILED_ASSERTION
Aborted
```
###### Backtrace
```sh
Program received signal SIGABRT, Aborted.
__pthread_kill_implementation (no_tid=0, signo=6, threadid=140737350406336) at ./nptl/pthread_kill.c:44
44 ./nptl/pthread_kill.c: No such file or directory.
(gdb) bt
#0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=140737350406336) at ./nptl/pthread_kill.c:44
#1 __pthread_kill_internal (signo=6, threadid=140737350406336) at ./nptl/pthread_kill.c:78
#2 __GI___pthread_kill (threadid=140737350406336, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
#3 0x00007ffff7cb4476 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#4 0x00007ffff7c9a7f3 in __GI_abort () at ./stdlib/abort.c:79
#5 0x00005555558742f5 in jerry_port_fatal (code=code@entry=JERRY_FATAL_FAILED_ASSERTION) at /jerryscript/jerry-port/common/jerry-port-process.c:29
#6 0x00005555557623b8 in jerry_fatal (code=code@entry=JERRY_FATAL_FAILED_ASSERTION) at /jerryscript/jerry-core/jrt/jrt-fatals.c:63
#7 0x000055555576226c in jerry_assert_fail (assertion=<optimized out>, file=<optimized out>, function=<optimized out>, line=line@entry=538) at /jerryscript/jerry-core/jrt/jrt-fatals.c:83
#8 0x000055555583b4b2 in parser_parse_class_body (context_p=0x7fffffffdd60, opts=PARSER_CLASS_LITERAL_NO_OPTS, class_name_index=<optimized out>) at /jerryscript/jerry-core/parser/js/js-parser-expr.c:538
#9 parser_parse_class (context_p=0x7fffffffdd60, is_statement=<optimized out>) at /jerryscript/jerry-core/parser/js/js-parser-expr.c:1110
#10 0x000055555583c550 in parser_parse_unary_expression (context_p=0x7fffffffdd60, grouping_level_p=<optimized out>) at /jerryscript/jerry-core/parser/js/js-parser-expr.c:2217
#11 parser_parse_expression (context_p=0x7fffffffdd60, options=4) at /jerryscript/jerry-core/parser/js/js-parser-expr.c:4115
#12 0x000055555583a7cc in parser_parse_class_body (context_p=0x7fffffffdd60, opts=PARSER_CLASS_LITERAL_NO_OPTS, class_name_index=<optimized out>) at /jerryscript/jerry-core/parser/js/js-parser-expr.c:843
#13 parser_parse_class (context_p=0x7fffffffdd60, is_statement=<optimized out>) at /jerryscript/jerry-core/parser/js/js-parser-expr.c:1110
#14 0x000055555583c550 in parser_parse_unary_expression (context_p=0x7fffffffdd60, grouping_level_p=<optimized out>) at /jerryscript/jerry-core/parser/js/js-parser-expr.c:2217
#15 parser_parse_expression (context_p=0x7fffffffdd60, options=4) at /jerryscript/jerry-core/parser/js/js-parser-expr.c:4115
#16 0x0000555555834d92 in lexer_expect_object_literal_id (context_p=context_p@entry=0x7fffffffdd60, ident_opts=1, ident_opts@entry=1435999920) at /jerryscript/jerry-core/parser/js/js-lexer.c:3097
#17 0x0000555555838fe9 in parser_parse_class_body (context_p=0x7fffffffdd60, opts=PARSER_CLASS_LITERAL_NO_OPTS, class_name_index=<optimized out>) at /jerryscript/jerry-core/parser/js/js-parser-expr.c:691
#18 parser_parse_class (context_p=0x7fffffffdd60, is_statement=<optimized out>) at /jerryscript/jerry-core/parser/js/js-parser-expr.c:1110
#19 0x0000555555859db5 in parser_parse_statements (context_p=0x7fffffffdd60) at /jerryscript/jerry-core/parser/js/js-parser-statm.c:2787
#20 0x000055555577c016 in parser_parse_source (source_p=source_p@entry=0x7ffff5e00aa0, parse_opts=parse_opts@entry=0, options_p=options_p@entry=0x7ffff5f00830)
at /jerryscript/jerry-core/parser/js/js-parser.c:2280
#21 0x000055555577a391 in parser_parse_script (source_p=0x3fa8d9, source_p@entry=0x7ffff5e00aa0, parse_opts=4171993, parse_opts@entry=0, options_p=0x6, options_p@entry=0x7ffff5f00830)
at /jerryscript/jerry-core/parser/js/js-parser.c:3326
#22 0x000055555568d3ca in jerry_parse_common (source_p=0x7ffff5e00aa0, options_p=options_p@entry=0x7ffff5f00830, parse_opts=parse_opts@entry=0) at /jerryscript/jerry-core/api/jerryscript.c:412
#23 0x000055555568d22c in jerry_parse (source_p=<optimized out>, source_size=<optimized out>, options_p=<optimized out>) at /jerryscript/jerry-core/api/jerryscript.c:480
#24 0x0000555555872962 in jerryx_source_parse_script (path_p=<optimized out>) at /jerryscript/jerry-ext/util/sources.c:52
#25 0x0000555555872b54 in jerryx_source_exec_script (path_p=0x3fa8d9 <error: Cannot access memory at address 0x3fa8d9>) at /jerryscript/jerry-ext/util/sources.c:63
#26 0x00005555556860bc in main (argc=<optimized out>, argv=<optimized out>) at /jerryscript/jerry-main/main-desktop.c:156
```
###### Output(release)
```sh
AddressSanitizer:DEADLYSIGNAL
=================================================================
==3823600==ERROR: AddressSanitizer: SEGV on unknown address 0x00000000000a (pc 0x55c958c85b99 bp 0x7ffc2fc75010 sp 0x7ffc2fc74e80 T0)
==3823600==The signal is caused by a READ memory access.
==3823600==Hint: address points to the zero page.
#0 0x55c958c85b99 in parser_parse_class_body /jerryscript/jerry-core/parser/js/js-parser-expr.c:541:32
#1 0x55c958c85b99 in parser_parse_class /jerryscript/jerry-core/parser/js/js-parser-expr.c:1110:27
#2 0x55c958c8879d in parser_parse_unary_expression /jerryscript/jerry-core/parser/js/js-parser-expr.c:2217:7
#3 0x55c958c8879d in parser_parse_expression /jerryscript/jerry-core/parser/js/js-parser-expr.c:4115:9
#4 0x55c958c87043 in parser_parse_class_body /jerryscript/jerry-core/parser/js/js-parser-expr.c:843:13
#5 0x55c958c87043 in parser_parse_class /jerryscript/jerry-core/parser/js/js-parser-expr.c:1110:27
#6 0x55c958c8879d in parser_parse_unary_expression /jerryscript/jerry-core/parser/js/js-parser-expr.c:2217:7
#7 0x55c958c8879d in parser_parse_expression /jerryscript/jerry-core/parser/js/js-parser-expr.c:4115:9
#8 0x55c958c82802 in lexer_expect_object_literal_id /jerryscript/jerry-core/parser/js/js-lexer.c:3097:9
#9 0x55c958c85ea8 in parser_parse_class_body /jerryscript/jerry-core/parser/js/js-parser-expr.c:691:9
#10 0x55c958c85ea8 in parser_parse_class /jerryscript/jerry-core/parser/js/js-parser-expr.c:1110:27
#11 0x55c958c9e7a8 in parser_parse_statements /jerryscript/jerry-core/parser/js/js-parser-statm.c:2787:9
#12 0x55c958bf0c8c in parser_parse_source /jerryscript/jerry-core/parser/js/js-parser.c:2280:5
#13 0x55c958bef7b3 in parser_parse_script /jerryscript/jerry-core/parser/js/js-parser.c:3326:38
#14 0x55c958b4cf38 in jerry_parse_common /jerryscript/jerry-core/api/jerryscript.c:412:21
#15 0x55c958b4cd34 in jerry_parse /jerryscript/jerry-core/api/jerryscript.c:480:10
#16 0x55c958cb25ef in jerryx_source_parse_script /jerryscript/jerry-ext/util/sources.c:52:26
#17 0x55c958cb27af in jerryx_source_exec_script /jerryscript/jerry-ext/util/sources.c:63:26
#18 0x55c958b485b2 in main /jerryscript/jerry-main/main-desktop.c:156:20
#19 0x7f3fcdda2d8f in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16
#20 0x7f3fcdda2e3f in __libc_start_main csu/../csu/libc-start.c:392:3
#21 0x55c958a88424 in _start (/jerryscript/1120/bin/jerry+0x41424) (BuildId: cf2994fd54b657190fc30f38dcd053553bef67f2)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /jerryscript/jerry-core/parser/js/js-parser-expr.c:541:32 in parser_parse_class_body
==3823600==ABORTING
``` | Assertion 'opts & PARSER_CLASS_LITERAL_CTOR_PRESENT' failed at /jerryscript/jerry-core/parser/js/js-parser-expr.c(parser_parse_class_body):538 | https://api.github.com/repos/jerryscript-project/jerryscript/issues/5113/comments | 0 | 2023-11-23T03:56:16Z | 2023-11-23T03:56:16Z | https://github.com/jerryscript-project/jerryscript/issues/5113 | 2,007,445,788 | 5,113 |
[
"jerryscript-project",
"jerryscript"
]
| I build Jerryscript on MSYS2, it occurs error at this step:
```sh
[235/235] Linking C executable bin\jerry.exe
FAILED: bin/jerry.exe
cmd.exe /C "cd . && C:\Users\luoluo\scoop\apps\msys2\2023-10-26\mingw64\bin\cc.exe -std=c99 -pedantic -Wall -Werror=all -Wextra -Werror=extra -Wformat-nonliteral -Werror=format-nonliteral -Winit-self -Werror=init-self -Wsign-conversion -Werror=sign-conversion -Wformat-security -Werror=format-security -Wmissing-declarations -Werror=missing-declarations -Wshadow -Werror=shadow -Wstrict-prototypes -Werror=strict-prototypes -Wundef -Werror=undef -Wold-style-definition -Werror=old-style-definition -Wno-stack-protector -Wno-attributes -Werror -Wlogical-op -Werror=logical-op -Wno-implicit-fallthrough -Os -DNDEBUG -s jerry-main/CMakeFiles/jerry.dir/main-desktop.c.obj jerry-main/CMakeFiles/jerry.dir/arguments/options.c.obj jerry-main/CMakeFiles/jerry.dir/arguments/cli.c.obj -o bin\jerry.exe -Wl,--out-implib,lib\libjerry.dll.a -Wl,--major-image-version,0,--minor-image-version,0 lib/libjerry-core.a lib/libjerry-ext.a lib/libjerry-port.a lib/libjerry-core.a -lm -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 && cd ."
C:/Users/luoluo/scoop/apps/msys2/2023-10-26/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: lib/libjerry-core.a(jerryscript.c.obj):jerryscript.c:(.text+0x30aa): undefined reference to `jerry_port_log'
C:/Users/luoluo/scoop/apps/msys2/2023-10-26/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: lib/libjerry-core.a(jerryscript.c.obj):jerryscript.c:(.text+0x31f9): undefined reference to `jerry_port_log'
C:/Users/luoluo/scoop/apps/msys2/2023-10-26/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: lib/libjerry-core.a(jerryscript.c.obj):jerryscript.c:(.text+0x332d): undefined reference to `jerry_port_log'
C:/Users/luoluo/scoop/apps/msys2/2023-10-26/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: lib/libjerry-core.a(jerryscript.c.obj):jerryscript.c:(.text+0x3353): undefined reference to `jerry_port_log'
C:/Users/luoluo/scoop/apps/msys2/2023-10-26/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: lib/libjerry-core.a(jrt-fatals.c.obj):jrt-fatals.c:(.text+0x5): undefined reference to `jerry_port_fatal'
C:/Users/luoluo/scoop/apps/msys2/2023-10-26/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: lib/libjerry-core.a(jerry-module.c.obj):jerry-module.c:(.text+0x1e3): undefined reference to `jerry_port_source_read'
C:/Users/luoluo/scoop/apps/msys2/2023-10-26/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: lib/libjerry-core.a(jerry-module.c.obj):jerry-module.c:(.text+0x24b): undefined reference to `jerry_port_source_free'
C:/Users/luoluo/scoop/apps/msys2/2023-10-26/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: lib/libjerry-ext.a(handlers.c.obj):handlers.c:(.text+0xa0): undefined reference to `jerry_port_fatal'
C:/Users/luoluo/scoop/apps/msys2/2023-10-26/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: lib/libjerry-ext.a(print.c.obj):print.c:(.text+0x60): undefined reference to `jerry_port_print_buffer'
C:/Users/luoluo/scoop/apps/msys2/2023-10-26/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: lib/libjerry-ext.a(print.c.obj):print.c:(.text+0xb5): undefined reference to `jerry_port_print_buffer'
C:/Users/luoluo/scoop/apps/msys2/2023-10-26/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: lib/libjerry-ext.a(print.c.obj):print.c:(.text+0xe0): undefined reference to `jerry_port_print_buffer'
C:/Users/luoluo/scoop/apps/msys2/2023-10-26/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: lib/libjerry-ext.a(print.c.obj):print.c:(.text+0x2c4): undefined reference to `jerry_port_source_read'
C:/Users/luoluo/scoop/apps/msys2/2023-10-26/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: lib/libjerry-ext.a(print.c.obj):print.c:(.text+0x326): undefined reference to `jerry_port_source_free'
C:/Users/luoluo/scoop/apps/msys2/2023-10-26/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: lib/libjerry-ext.a(print.c.obj):print.c:(.text+0x7b): undefined reference to `jerry_port_print_byte'
C:/Users/luoluo/scoop/apps/msys2/2023-10-26/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: lib/libjerry-ext.a(print.c.obj):print.c:(.text+0x80): undefined reference to `jerry_port_print_buffer'
C:/Users/luoluo/scoop/apps/msys2/2023-10-26/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: lib/libjerry-ext.a(print.c.obj):print.c:(.text+0x9e): undefined reference to `jerry_port_print_buffer'
C:/Users/luoluo/scoop/apps/msys2/2023-10-26/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: lib/libjerry-ext.a(repl.c.obj):repl.c:(.text+0x3d): undefined reference to `jerry_port_line_read'
C:/Users/luoluo/scoop/apps/msys2/2023-10-26/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: lib/libjerry-ext.a(repl.c.obj):repl.c:(.text+0x7f): undefined reference to `jerry_port_line_free'
C:/Users/luoluo/scoop/apps/msys2/2023-10-26/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: lib/libjerry-ext.a(repl.c.obj):repl.c:(.text+0xac): undefined reference to `jerry_port_line_free'
C:/Users/luoluo/scoop/apps/msys2/2023-10-26/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: lib/libjerry-ext.a(sources.c.obj):sources.c:(.text+0xf): undefined reference to `jerry_port_source_read'
C:/Users/luoluo/scoop/apps/msys2/2023-10-26/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: lib/libjerry-ext.a(sources.c.obj):sources.c:(.text+0x4f): undefined reference to `jerry_port_source_free'
C:/Users/luoluo/scoop/apps/msys2/2023-10-26/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: lib/libjerry-ext.a(sources.c.obj):sources.c:(.text+0xac): undefined reference to `jerry_port_source_free'
C:/Users/luoluo/scoop/apps/msys2/2023-10-26/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: lib/libjerry-ext.a(sources.c.obj):sources.c:(.text+0x1ac): undefined reference to `jerry_port_source_read'
C:/Users/luoluo/scoop/apps/msys2/2023-10-26/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: lib/libjerry-ext.a(sources.c.obj):sources.c:(.text+0x202): undefined reference to `jerry_port_source_free'
C:/Users/luoluo/scoop/apps/msys2/2023-10-26/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: lib/libjerry-ext.a(sources.c.obj):sources.c:(.text+0x22c): undefined reference to `jerry_port_line_read'
C:/Users/luoluo/scoop/apps/msys2/2023-10-26/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: lib/libjerry-ext.a(sources.c.obj):sources.c:(.text+0x264): undefined reference to `jerry_port_line_free'
collect2.exe: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
```
And the `gcc` version is `13.2.0`, `cmake` version is `3.27.7`. These toolchain all installed by pacman.
| link error when build jerry.exe on MSYS2 MinGW64 | https://api.github.com/repos/jerryscript-project/jerryscript/issues/5107/comments | 0 | 2023-11-10T12:53:32Z | 2023-11-10T12:53:32Z | https://github.com/jerryscript-project/jerryscript/issues/5107 | 1,987,575,228 | 5,107 |
[
"jerryscript-project",
"jerryscript"
]
|
jerryScript version 3.0.0:
commit 05dbbd134c3b9e2482998f267857dd3722001cd7
Build platform:
Ubuntu 20.04
Build cmd:
```
python tools/build.py --debug --profile=es.next --lto=off --compile-flag=-D_POSIX_C_SOURCE=200809 --compile-flag=-Wno-strict-prototypes --stack-limit=15
```
Test case
```js
var a = new Uint16Array(Uint16Array, Uint16Array);
var b = `
var o = {
m(apple) {
class Foo extends b {
static {}
512;
static #m() {}
}
return apple;
},
};
`;
for (var [...i] of b) {
i.splice(a, i);
b += i;
function bar() {
return Uint16Array;
}
try { bar.constructor(b); } catch (e) {}
}
```
Error message:
SEGV on ASAN version
```
AddressSanitizer:DEADLYSIGNAL
=================================================================
==510031==ERROR: AddressSanitizer: SEGV on unknown address 0x000000005198 (pc 0x5618574bc04b bp 0x7ffd51997c50 sp 0x7ffd51997bb0 T0)
==510031==The signal is caused by a READ memory access.
```
Aborted with assertion error in debug version:
```
ICE: Assertion 'context_p->source_p < context_p->source_end_p' failed at /media/Store/JS-engines/jerryscript/jerryscript-pure/jerry-core/parser/js/js-lexer.c(lexer_consume_next_character):1821.
Error: JERRY_FATAL_FAILED_ASSERTION
Aborted (core dumped)
``` | Segmentation Fault in release. Assertion 'context_p->source_p < context_p->source_end_p' failed in debug version | https://api.github.com/repos/jerryscript-project/jerryscript/issues/5105/comments | 0 | 2023-10-18T07:18:45Z | 2023-10-18T07:18:45Z | https://github.com/jerryscript-project/jerryscript/issues/5105 | 1,949,030,986 | 5,105 |
[
"jerryscript-project",
"jerryscript"
]
|
jerryScript version 3.0.0:
commit 05dbbd134c3b9e2482998f267857dd3722001cd7
Build platform:
Ubuntu 20.04
Build cmd:
```
python tools/build.py --debug --profile=es.next --lto=off --compile-flag=-D_POSIX_C_SOURCE=200809 --compile-flag=-Wno-strict-prototypes --stack-limit=15
```
Test case
```js
class Foo {
valueOf(m, n) {
var a;
try { a = this.valueOf(); } catch (e) {}
var b = `
class Bar extends m {
constructor(a21, a22) {
}
static {
for (let i25 = 0; i25 < 5;) {
}
}
/*
constructor(a31) {
/0()*/;
isNaN(a);
}
*/
}
`;
eval(b, eval, this, a);
}
}
var c = new Foo();
c.valueOf();
```
Error message:
SEGV on ASAN version
```
AddressSanitizer:DEADLYSIGNAL
=================================================================
==505902==ERROR: AddressSanitizer: SEGV on unknown address 0x000000002cee (pc 0x55ca4212e04b bp 0x7ffc2cef5740 sp 0x7ffc2cef56a0 T0)
==505902==The signal is caused by a READ memory access.
```
Aborted with assertion error in debug version:
```
ICE: Assertion 'context_p->next_scanner_info_p->type == SCANNER_TYPE_FUNCTION' failed at jerry-core/parser/js/js-parser.c(parser_parse_function_arguments):1587.
Error: JERRY_FATAL_FAILED_ASSERTION
Aborted (core dumped)
``` | Segmentation Fault in release. Assertion 'context_p->next_scanner_info_p->type == SCANNER_TYPE_FUNCTION' failed on debug. | https://api.github.com/repos/jerryscript-project/jerryscript/issues/5104/comments | 0 | 2023-10-18T07:17:35Z | 2023-10-18T07:17:35Z | https://github.com/jerryscript-project/jerryscript/issues/5104 | 1,949,029,194 | 5,104 |
[
"jerryscript-project",
"jerryscript"
]
| Hello 👋
I run a security community that finds and fixes vulnerabilities in OSS. A researcher (@gandalf4a) has found a potential issue, which I would be eager to share with you.
Could you add a `SECURITY.md` file with an e-mail address for me to send further details to? GitHub [recommends](https://docs.github.com/en/code-security/getting-started/adding-a-security-policy-to-your-repository) a security policy to ensure issues are responsibly disclosed, and it would help direct researchers in the future.
Looking forward to hearing from you 👍
(cc @huntr-helper) | Who to contact for security issues | https://api.github.com/repos/jerryscript-project/jerryscript/issues/5103/comments | 0 | 2023-10-12T14:02:23Z | 2023-10-12T14:02:23Z | https://github.com/jerryscript-project/jerryscript/issues/5103 | 1,940,073,361 | 5,103 |
[
"jerryscript-project",
"jerryscript"
]
| ###### JerryScript revision
```
$ git show
commit a588e4966175a190ec6350b2a3689d30ed017ec9 (HEAD -> master, origin/master, origin/HEAD)
Author: Máté Tokodi <[email protected]>
Date: Wed Sep 20 15:38:30 2023 +0200
```
###### Build & Execution platform
```
$ uname -a
Linux user-AYA-NEO-FOUNDER 5.19.0-43-generic #44~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Mon May 22 13:39:36 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
```
###### Build steps
```
export CC=clang
python tools/build.py --compile-flag=-fsanitize-coverage=trace-pc-guard --compile-flag="-fsanitize=address -g" --profile=es.next --lto=off --compile-flag=-D_POSIX_C_SOURCE=200809 --stack-limit=15 --compile-flag=-Werror --compile-flag=-Wincompatible-pointer-types --compile-flag=-Wno-strict-prototypes
```
###### Test case
the pocfile.js
```
async function f0(a1, a2) {
function f5(a6, a7, a8, a9) {
return f5;
}
var o10 = {
"get": Object,
};
await 785.2893486668286;
try {
f0["F"](h);
} catch(e16) {
}
function f18(a19, a20) {
return f0;
}
var v21 = new Proxy(a1, o10);
try {
undefined[Uint8Array](MAX_SAFE_INTEGER);
} catch(e26) {
var v27 = 99 | 99;
for (var v28 = 0; v28 < 100; v28++) {
try {
eval(String.fromCodePoint(v27, v28));
prototype[POSITIVE_INFINITY]();
} catch(e36) {
}
}
}
return v21;
}
f0(f0);
// CRASH INFO
// ==========
// TERMSIG: 11
// STDERR:
//
// STDOUT:
//
// ARGS: /home/user/jerryscript/build/bin/jerry --reprl-fuzzilli
// EXECUTION TIME: 26ms
```
###### Execution steps
```sh
./build/bin/jerry pocfile.js
```
###### Output
asan report:
```
AddressSanitizer:DEADLYSIGNAL
=================================================================
==4174418==ERROR: AddressSanitizer: SEGV on unknown address 0x000002032210 (pc 0x00000041ee08 bp 0x000000000008 sp 0x7ffcc387dd60 T0)
==4174418==The signal is caused by a WRITE memory access.
#0 0x41ee08 in jmem_pools_free /home/user/fuzz/jerryscript_origin/jerryscript/jerry-core/jmem/jmem-poolman.c:136:29
#1 0x580591 in vm_stack_context_abort_variable_length /home/user/fuzz/jerryscript_origin/jerryscript/jerry-core/vm/vm-stack.c:73:5
#2 0x580591 in vm_stack_context_abort /home/user/fuzz/jerryscript_origin/jerryscript/jerry-core/vm/vm-stack.c:125:24
#3 0x580cbc in vm_stack_find_finally /home/user/fuzz/jerryscript_origin/jerryscript/jerry-core/vm/vm-stack.c:420:19
#4 0x58f8a3 in vm_loop /home/user/fuzz/jerryscript_origin/jerryscript/jerry-core/vm/vm.c:4892:15
#5 0x582c82 in vm_execute /home/user/fuzz/jerryscript_origin/jerryscript/jerry-core/vm/vm.c:5211:37
#6 0x57b6db in opfunc_resume_executable_object /home/user/fuzz/jerryscript_origin/jerryscript/jerry-core/vm/opcodes.c:758:25
#7 0x529e88 in ecma_process_promise_async_reaction_job /home/user/fuzz/jerryscript_origin/jerryscript/jerry-core/ecma/operations/ecma-jobqueue.c:363:12
#8 0x529e88 in ecma_process_all_enqueued_jobs /home/user/fuzz/jerryscript_origin/jerryscript/jerry-core/ecma/operations/ecma-jobqueue.c:567:15
#9 0x4dbf52 in jerry_run_jobs /home/user/fuzz/jerryscript_origin/jerryscript/jerry-core/api/jerryscript.c:1078:24
#10 0x4d7208 in main /home/user/fuzz/jerryscript_origin/jerryscript/jerry-main/main-desktop.c:229:12
#11 0x7efc7c629d8f in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16
#12 0x7efc7c629e3f in __libc_start_main csu/../csu/libc-start.c:392:3
#13 0x41ee74 in _start (/home/user/fuzz/jerryscript_origin/jerryscript/build/bin/jerry+0x41ee74)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /home/user/fuzz/jerryscript_origin/jerryscript/jerry-core/jmem/jmem-poolman.c:136:29 in jmem_pools_free
==4174418==ABORTING
```
###### Backtrace
```
$ gdb -nx -q ./jerry -ex 'r /home/user/vul/crash/Jerryscript/out/crashes/program_20230412010753_28034C1C-6509-445B-8305-557EE504E083_deterministic.js'
Reading symbols from ./jerry...
Starting program: /home/user/fuzz/jerryscript_origin/jerryscript/build/bin/jerry /home/user/vul/crash/Jerryscript/out/crashes/program_20230412010753_28034C1C-6509-445B-8305-557EE504E083_deterministic.js
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Program received signal SIGSEGV, Segmentation fault.
0x000000000041d592 in jmem_heap_find_prev (block_p=<optimized out>) at /home/user/fuzz/jerryscript_origin/jerryscript/jerry-core/jmem/jmem-heap.c:379
379 while (prev_p->next_offset < block_offset)
(gdb)
```
###### Expected behavior
SEGV or crash
###### Credits:
@gandalf4a | SEGV ./jerry-core/jmem/jmem-poolman.c:136:29 in jmem_pools_free | https://api.github.com/repos/jerryscript-project/jerryscript/issues/5102/comments | 0 | 2023-10-04T14:48:47Z | 2023-10-04T14:48:47Z | https://github.com/jerryscript-project/jerryscript/issues/5102 | 1,926,388,403 | 5,102 |
[
"jerryscript-project",
"jerryscript"
]
| ###### JerryScript revision
```
$ git show
commit a588e4966175a190ec6350b2a3689d30ed017ec9 (HEAD -> master, origin/master, origin/HEAD)
Author: Máté Tokodi <[email protected]>
Date: Wed Sep 20 15:38:30 2023 +0200
```
###### Build & Execution platform
```
$ uname -a
Linux user-AYA-NEO-FOUNDER 5.19.0-43-generic #44~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Mon May 22 13:39:36 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
```
###### Build steps
```
export CC=clang
python tools/build.py --compile-flag=-fsanitize-coverage=trace-pc-guard --compile-flag="-fsanitize=address -g" --profile=es.next --lto=off --compile-flag=-D_POSIX_C_SOURCE=200809 --stack-limit=15 --compile-flag=-Werror --compile-flag=-Wincompatible-pointer-types --compile-flag=-Wno-strict-prototypes
```
###### Test case
the pocfile.js
```
async function f0(a1, a2) {
function f6(a7, a8, a9, ...a10) {
return f0;
}
var o11 = {
"get": f0,
};
var v12 = f0();
v12.__proto__ = f0;
async function f13(a14, a15) {
("h").matchAll(a14);
return v12;
}
f13(v12);
var v19 = new Proxy(f6, o11);
f0.__proto__ = v19;
f0["F"](h);
return f0;
}
f0(f0, f0);
// CRASH INFO
// ==========
// TERMSIG: 11
// STDERR:
//
// STDOUT:
//
// ARGS: /home/user/jerryscript/build/bin/jerry --reprl-fuzzilli
// EXECUTION TIME: 129ms
```
###### Execution steps
```sh
./build/bin/jerry pocfile.js
```
###### Output
asan report:
```
AddressSanitizer:DEADLYSIGNAL
=================================================================
==4145220==ERROR: AddressSanitizer: SEGV on unknown address 0x000001632228 (pc 0x0000004fa98a bp 0x7ffd146d3570 sp 0x7ffd146d3450 T0)
==4145220==The signal is caused by a READ memory access.
#0 0x4fa98a in ecma_get_object_type /home/user/fuzz/jerryscript_origin/jerryscript/jerry-core/ecma/base/ecma-helpers.c:238:58
#1 0x530b2b in ecma_op_object_get_own_property_descriptor /home/user/fuzz/jerryscript_origin/jerryscript/jerry-core/ecma/operations/ecma-objects.c:1806:7
#2 0x53742e in ecma_proxy_object_get /home/user/fuzz/jerryscript_origin/jerryscript/jerry-core/ecma/operations/ecma-proxy-object.c:1185:25
#3 0x5bafa5 in ecma_builtin_string_prototype_object_match_all /home/user/fuzz/jerryscript_origin/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-string-prototype.c:384:32
#4 0x5bafa5 in ecma_builtin_string_prototype_dispatch_routine /home/user/fuzz/jerryscript_origin/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-string-prototype.c:1397:12
#5 0x50b96c in ecma_builtin_dispatch_routine /home/user/fuzz/jerryscript_origin/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1460:10
#6 0x50b96c in ecma_builtin_dispatch_call /home/user/fuzz/jerryscript_origin/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1489:12
#7 0x525d04 in ecma_op_function_call_native_built_in /home/user/fuzz/jerryscript_origin/jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1217:5
#8 0x52548f in ecma_op_function_call /home/user/fuzz/jerryscript_origin/jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1411:16
#9 0x5832d5 in opfunc_call /home/user/fuzz/jerryscript_origin/jerryscript/jerry-core/vm/vm.c:758:5
#10 0x5832d5 in vm_execute /home/user/fuzz/jerryscript_origin/jerryscript/jerry-core/vm/vm.c:5217:9
#11 0x581e39 in vm_run /home/user/fuzz/jerryscript_origin/jerryscript/jerry-core/vm/vm.c:5312:10
#12 0x52592a in ecma_op_function_call_simple /home/user/fuzz/jerryscript_origin/jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1176:28
#13 0x5254c5 in ecma_op_function_call /home/user/fuzz/jerryscript_origin/jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1406:16
#14 0x5832d5 in opfunc_call /home/user/fuzz/jerryscript_origin/jerryscript/jerry-core/vm/vm.c:758:5
#15 0x5832d5 in vm_execute /home/user/fuzz/jerryscript_origin/jerryscript/jerry-core/vm/vm.c:5217:9
#16 0x581e39 in vm_run /home/user/fuzz/jerryscript_origin/jerryscript/jerry-core/vm/vm.c:5312:10
#17 0x52592a in ecma_op_function_call_simple /home/user/fuzz/jerryscript_origin/jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1176:28
#18 0x5254c5 in ecma_op_function_call /home/user/fuzz/jerryscript_origin/jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1406:16
#19 0x5832d5 in opfunc_call /home/user/fuzz/jerryscript_origin/jerryscript/jerry-core/vm/vm.c:758:5
#20 0x5832d5 in vm_execute /home/user/fuzz/jerryscript_origin/jerryscript/jerry-core/vm/vm.c:5217:9
#21 0x581e39 in vm_run /home/user/fuzz/jerryscript_origin/jerryscript/jerry-core/vm/vm.c:5312:10
#22 0x52592a in ecma_op_function_call_simple /home/user/fuzz/jerryscript_origin/jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1176:28
#23 0x5254c5 in ecma_op_function_call /home/user/fuzz/jerryscript_origin/jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1406:16
#24 0x5373ba in ecma_proxy_object_get /home/user/fuzz/jerryscript_origin/jerryscript/jerry-core/ecma/operations/ecma-proxy-object.c:1173:30
#25 0x58d2a9 in vm_loop /home/user/fuzz/jerryscript_origin/jerryscript/jerry-core/vm/vm.c:2959:20
#26 0x582c82 in vm_execute /home/user/fuzz/jerryscript_origin/jerryscript/jerry-core/vm/vm.c:5211:37
#27 0x581e39 in vm_run /home/user/fuzz/jerryscript_origin/jerryscript/jerry-core/vm/vm.c:5312:10
#28 0x52592a in ecma_op_function_call_simple /home/user/fuzz/jerryscript_origin/jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1176:28
#29 0x5254c5 in ecma_op_function_call /home/user/fuzz/jerryscript_origin/jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1406:16
#30 0x5832d5 in opfunc_call /home/user/fuzz/jerryscript_origin/jerryscript/jerry-core/vm/vm.c:758:5
#31 0x5832d5 in vm_execute /home/user/fuzz/jerryscript_origin/jerryscript/jerry-core/vm/vm.c:5217:9
#32 0x581e39 in vm_run /home/user/fuzz/jerryscript_origin/jerryscript/jerry-core/vm/vm.c:5312:10
#33 0x52592a in ecma_op_function_call_simple /home/user/fuzz/jerryscript_origin/jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1176:28
#34 0x5254c5 in ecma_op_function_call /home/user/fuzz/jerryscript_origin/jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1406:16
#35 0x5832d5 in opfunc_call /home/user/fuzz/jerryscript_origin/jerryscript/jerry-core/vm/vm.c:758:5
#36 0x5832d5 in vm_execute /home/user/fuzz/jerryscript_origin/jerryscript/jerry-core/vm/vm.c:5217:9
#37 0x581e39 in vm_run /home/user/fuzz/jerryscript_origin/jerryscript/jerry-core/vm/vm.c:5312:10
#38 0x52592a in ecma_op_function_call_simple /home/user/fuzz/jerryscript_origin/jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1176:28
#39 0x5254c5 in ecma_op_function_call /home/user/fuzz/jerryscript_origin/jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1406:16
#40 0x5832d5 in opfunc_call /home/user/fuzz/jerryscript_origin/jerryscript/jerry-core/vm/vm.c:758:5
#41 0x5832d5 in vm_execute /home/user/fuzz/jerryscript_origin/jerryscript/jerry-core/vm/vm.c:5217:9
#42 0x581e39 in vm_run /home/user/fuzz/jerryscript_origin/jerryscript/jerry-core/vm/vm.c:5312:10
#43 0x52592a in ecma_op_function_call_simple /home/user/fuzz/jerryscript_origin/jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1176:28
#44 0x5254c5 in ecma_op_function_call /home/user/fuzz/jerryscript_origin/jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1406:16
#45 0x5832d5 in opfunc_call /home/user/fuzz/jerryscript_origin/jerryscript/jerry-core/vm/vm.c:758:5
#46 0x5832d5 in vm_execute /home/user/fuzz/jerryscript_origin/jerryscript/jerry-core/vm/vm.c:5217:9
#47 0x581e39 in vm_run /home/user/fuzz/jerryscript_origin/jerryscript/jerry-core/vm/vm.c:5312:10
#48 0x581ba0 in vm_run_global /home/user/fuzz/jerryscript_origin/jerryscript/jerry-core/vm/vm.c:286:25
#49 0x4dae6a in jerry_run /home/user/fuzz/jerryscript_origin/jerryscript/jerry-core/api/jerryscript.c:548:24
#50 0x5f9127 in jerryx_source_exec_script /home/user/fuzz/jerryscript_origin/jerryscript/jerry-ext/util/sources.c:68:14
#51 0x4d6e94 in main /home/user/fuzz/jerryscript_origin/jerryscript/jerry-main/main-desktop.c:156:20
#52 0x7f1536429d8f in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16
#53 0x7f1536429e3f in __libc_start_main csu/../csu/libc-start.c:392:3
#54 0x41ee74 in _start (/home/user/fuzz/jerryscript_origin/jerryscript/build/bin/jerry+0x41ee74)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /home/user/fuzz/jerryscript_origin/jerryscript/jerry-core/ecma/base/ecma-helpers.c:238:58 in ecma_get_object_type
==4145220==ABORTING
```
###### Backtrace
```
$ gdb -nx -q ./jerry -ex 'r /home/user/fuzzilli-0.9.3/Targets/Jerryscript/out/crashes/program_20230514101203_40AD785C-9A14-45A0-90E3-D89516D5715C_deterministic.js'
Reading symbols from ./jerry...
Starting program: /home/user/fuzz/jerryscript_origin/jerryscript/build/bin/jerry /home/user/fuzzilli-0.9.3/Targets/Jerryscript/out/crashes/program_20230514101203_40AD785C-9A14-45A0-90E3-D89516D5715C_deterministic.js
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Program received signal SIGSEGV, Segmentation fault.
0x00000000004fa98a in ecma_get_object_type (object_p=object_p@entry=0x1632228) at /home/user/fuzz/jerryscript_origin/jerryscript/jerry-core/ecma/base/ecma-helpers.c:238
238 return (ecma_object_type_t) (object_p->type_flags_refs & ECMA_OBJECT_TYPE_MASK);
(gdb)
```
###### Expected behavior
SEGV or crash
###### Credits:
@gandalf4a of PKU-Changsha Institute for Computing and Digital Economy | SEGV ./jerry-core/ecma/base/ecma-helpers.c:238:58 | https://api.github.com/repos/jerryscript-project/jerryscript/issues/5101/comments | 1 | 2023-10-04T12:41:53Z | 2024-03-27T02:29:25Z | https://github.com/jerryscript-project/jerryscript/issues/5101 | 1,926,132,986 | 5,101 |
[
"jerryscript-project",
"jerryscript"
]
| The latest version
commit: 05dbbd134c3b9e2482998f267857dd3722001cd7
Build platform:
Ubuntu 20.04
Test case:
```
class Foo extends Array {
#x() {
}
}
var bar = new Foo();
bar[0] = 1;
```
build options
```
python tools/build.py --debug
```
error msg:
```
ICE: Assertion 'ecma_is_lexical_environment (obj_p) || !ecma_op_object_is_fast_array (obj_p)' failed at jerry-core/ecma/base/ecma-helpers.c(ecma_find_named_property):613.
Error: JERRY_FATAL_FAILED_ASSERTION
Aborted (core dumped)
```
| ICE: Assertion 'ecma_is_lexical_environment (obj_p) || !ecma_op_object_is_fast_array (obj_p)' failed at jerry-core/ecma/base/ecma-helpers.c | https://api.github.com/repos/jerryscript-project/jerryscript/issues/5100/comments | 0 | 2023-09-22T12:59:29Z | 2023-09-22T12:59:29Z | https://github.com/jerryscript-project/jerryscript/issues/5100 | 1,908,864,725 | 5,100 |
[
"jerryscript-project",
"jerryscript"
]
| The latest version
commit: 05dbbd134c3b9e2482998f267857dd3722001cd7
Build platform:
Ubuntu 20.04
Test case:
```
function foo(a) {
return a;
}
class Bar {
constructor(a) {
this[a ||= (foo ^ 1) << 2] = foo;
}
}
new Bar(foo);
```
build options
```
python tools/build.py --debug
```
error msg:
```
ICE: Assertion 'context_p->stack_depth == context_p->context_stack_depth' failed at jerry-core/parser/js/js-parser-statm.c(parser_parse_statements):2711.
Error: JERRY_FATAL_FAILED_ASSERTION
Aborted (core dumped)
```
| ICE: Assertion 'context_p->stack_depth == context_p->context_stack_depth' failed at jerry-core/parser/js/js-parser-statm.c | https://api.github.com/repos/jerryscript-project/jerryscript/issues/5099/comments | 0 | 2023-09-22T12:51:32Z | 2023-09-22T12:51:32Z | https://github.com/jerryscript-project/jerryscript/issues/5099 | 1,908,851,869 | 5,099 |
[
"jerryscript-project",
"jerryscript"
]
| The latest version
commit: 05dbbd134c3b9e2482998f267857dd3722001cd7
Build platform:
Ubuntu 20.04
Test case:
```
async function* foo() {
yield* foo;
return foo;
}
var i = Symbol.iterator;
foo[i] = foo;
var bar = foo();
bar.next(foo);
```
build options
```
python tools/build.py --debug
```
error msg:
```
ICE: Assertion 'capability_p != NULL' failed at jerry-core/ecma/builtin-objects/ecma-builtin-async-from-sync-iterator-prototype.c(ecma_builtin_async_from_sync_iterator_prototype_dispatch_routine):317.
Error: JERRY_FATAL_FAILED_ASSERTION
Aborted (core dumped)
```
| ICE: Assertion 'capability_p != NULL' failed at jerry-core/ecma/builtin-objects/ecma-builtin-async-from-sync-iterator-prototype.c | https://api.github.com/repos/jerryscript-project/jerryscript/issues/5098/comments | 0 | 2023-09-22T12:46:06Z | 2023-09-22T12:46:06Z | https://github.com/jerryscript-project/jerryscript/issues/5098 | 1,908,843,278 | 5,098 |
[
"jerryscript-project",
"jerryscript"
]
| The latest version
commit: 05dbbd134c3b9e2482998f267857dd3722001cd7
Build platform:
Ubuntu 20.04
Test case:
```
class Foo extends ([]).constructor {
#g;
}
new Foo();
```
If we build jerry with release configurations, a null pointer reference occured.
backstrace
```
==2237779==ERROR: AddressSanitizer: SEGV on unknown address 0x00000000 (pc 0x566be4f5 bp 0xff87e6d8 sp 0xff87e6d0 T0)
==2237779==The signal is caused by a READ memory access.
==2237779==Hint: address points to the zero page.
#0 0x566be4f4 in ecma_ref_ecma_string (release_05dbbd/bin/jerry+0xf24f4)
#1 0x566a84dc in ecma_create_property.lto_priv.0 (release_05dbbd/bin/jerry+0xdc4dc)
#2 0x566a8717 in ecma_create_named_data_property (release_05dbbd/bin/jerry+0xdc717)
#3 0x5664a213 in vm_loop (release_05dbbd/bin/jerry+0x7e213)
#4 0x56658991 in vm_execute (release_05dbbd/bin/jerry+0x8c991)
#5 0x56659eae in vm_run (release_05dbbd/bin/jerry+0x8deae)
#6 0x5665a15b in opfunc_init_class_fields (release_05dbbd/bin/jerry+0x8e15b)
#7 0x5669676b in ecma_op_function_construct (release_05dbbd/bin/jerry+0xca76b)
#8 0x566599ad in vm_execute (release_05dbbd/bin/jerry+0x8d9ad)
#9 0x56659eae in vm_run (release_05dbbd/bin/jerry+0x8deae)
#10 0x566ca815 in jerry_run (release_05dbbd/bin/jerry+0xfe815)
#11 0x565dd92e in main (release_05dbbd/bin/jerry+0x1192e)
#12 0xf75e8ed4 in __libc_start_main (/lib/i386-linux-gnu/libc.so.6+0x1aed4)
#13 0x565de3d4 in _start (release_05dbbd/bin/jerry+0x123d4)
```
If we build jerry with debug configurations, a assertion error occured.
build options
```
python tools/build.py --debug
```
error msg:
```
ICE: Assertion 'object_p != NULL && name_p != NULL' failed at jerry-core/ecma/base/ecma-helpers.c(ecma_create_named_data_property):526.
Error: JERRY_FATAL_FAILED_ASSERTION
Aborted (core dumped)
```
| Null pointer deference on release. ICE on debug: Assertion 'object_p != NULL && name_p != NULL' failed at jerry-core/ecma/base/ecma-helpers.c(ecma_create_named_data_property):526 | https://api.github.com/repos/jerryscript-project/jerryscript/issues/5097/comments | 0 | 2023-09-22T09:32:41Z | 2023-09-22T09:34:48Z | https://github.com/jerryscript-project/jerryscript/issues/5097 | 1,908,546,756 | 5,097 |
[
"jerryscript-project",
"jerryscript"
]
| I have a typescript node app with dependencies. I can build with webpack and run via node or execute directly with ts-node, now I would like to run via jerryscript. Are there any examples of transpiling to the appropriate versioned javascript, including dependencies, and creating a bundle?
I'm happy to use esbuild, rollup, weback, etc. | Recommendation to transpile and bundle typescript for running in jerryscript | https://api.github.com/repos/jerryscript-project/jerryscript/issues/5094/comments | 1 | 2023-08-24T18:45:23Z | 2023-09-15T18:23:35Z | https://github.com/jerryscript-project/jerryscript/issues/5094 | 1,865,698,503 | 5,094 |
[
"jerryscript-project",
"jerryscript"
]
| ###### JerryScript revision
Commit: https://github.com/jerryscript-project/jerryscript/commit/05dbbd134c3b9e2482998f267857dd3722001cd7
Version: v3.0.0
###### Build platform
Ubuntu 20.04.5 LTS (Linux 5.4.0-144-generic x86_64)
###### Build steps
```sh
python ./tools/build.py --clean --compile-flag=-m32 --compile-flag=-fno-omit-frame-pointer --compile-flag=-fno-common --compile-flag=-fsanitize=address --compile-flag=-g --strip=off --lto=off --error-messages=on --system-allocator=on --logging=on --line-info=on --stack-limit=20
```
###### Test case
<details><summary>testcase</summary>
<p>
```javascript
async function n() {
return 1 ;
}
import {
nFromEvent as''throw n ( ) undefined }
1
}
async function from async 1; }
async function a() {
var n = await 2 ;
return n ;
}
import { n };
return n;
}
var r = async function() {
var n = await 2; return n;
};
```
</p>
</details>
```javascript
// poc.js
import { nFromEvent as '' }
```
###### Execution steps & Output
```
$ ./jerryscript/build/bin/jerry poc.js
=================================================================
==1326574==ERROR: AddressSanitizer: heap-buffer-overflow on address 0xf510071e at pc 0x56641307 bp 0xffa4ba68 sp 0xffa4ba58
READ of size 1 at 0xf510071e thread T0
#0 0x56641306 in scanner_is_context_needed ./jerryscript/jerry-core/parser/js/js-scanner-util.c:2101
#1 0x56639a78 in parser_parse_source ./jerryscript/jerry-core/parser/js/js-parser.c:2267
#2 0x565cc3cf in jerry_parse_common ./jerryscript/jerry-core/api/jerryscript.c:412
#3 0x565cc631 in jerry_parse ./jerryscript/jerry-core/api/jerryscript.c:480
#4 0x566c1644 in jerryx_source_parse_script ./jerryscript/jerry-ext/util/sources.c:52
#5 0x566c1701 in jerryx_source_exec_script ./jerryscript/jerry-ext/util/sources.c:63
#6 0x565c4d04 in main ./jerryscript/jerry-main/main-desktop.c:156
#7 0xf769fed4 in __libc_start_main (/lib32/libc.so.6+0x1aed4)
#8 0x565c7fb4 in _start (./jerryscript/build/bin/jerry+0x12fb4)
0xf510071e is located 0 bytes to the right of 14-byte region [0xf5100710,0xf510071e)
allocated by thread T0 here:
#0 0xf7a88817 in __interceptor_malloc ../../../../../src/libsanitizer/asan/asan_malloc_linux.cc:144
#1 0x565c7ae4 in jmem_heap_alloc ./jerryscript/jerry-core/jmem/jmem-heap.c:254
#2 0x5662cd8d in jmem_heap_gc_and_alloc_block ./jerryscript/jerry-core/jmem/jmem-heap.c:291
#3 0x5663d2bd in scanner_malloc ./jerryscript/jerry-core/parser/js/js-scanner-util.c:93
#4 0x5663d33d in scanner_insert_info ./jerryscript/jerry-core/parser/js/js-scanner-util.c:183
#5 0x5663f35b in scanner_pop_literal_pool ./jerryscript/jerry-core/parser/js/js-scanner-util.c:949
#6 0x5664e18f in scanner_scan_all ./jerryscript/jerry-core/parser/js/js-scanner.c:3366
#7 0x5663913b in parser_parse_source ./jerryscript/jerry-core/parser/js/js-parser.c:2167
#8 0x565cc3cf in jerry_parse_common ./jerryscript/jerry-core/api/jerryscript.c:412
#9 0x565cc631 in jerry_parse ./jerryscript/jerry-core/api/jerryscript.c:480
#10 0x566c1644 in jerryx_source_parse_script ./jerryscript/jerry-ext/util/sources.c:52
#11 0x566c1701 in jerryx_source_exec_script ./jerryscript/jerry-ext/util/sources.c:63
#12 0x565c4d04 in main ./jerryscript/jerry-main/main-desktop.c:156
#13 0xf769fed4 in __libc_start_main (/lib32/libc.so.6+0x1aed4)
SUMMARY: AddressSanitizer: heap-buffer-overflow ./jerryscript/jerry-core/parser/js/js-scanner-util.c:2101 in scanner_is_context_needed
Shadow bytes around the buggy address:
0x3ea20090: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x3ea200a0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x3ea200b0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x3ea200c0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x3ea200d0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa 00 04
=>0x3ea200e0: fa fa 00[06]fa fa 00 07 fa fa 00 06 fa fa 00 03
0x3ea200f0: fa fa 00 07 fa fa 00 00 fa fa fa fa fa fa fa fa
0x3ea20100: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x3ea20110: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x3ea20120: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x3ea20130: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Container overflow: fc
Array cookie: ac
Intra object redzone: bb
ASan internal: fe
Left alloca redzone: ca
Right alloca redzone: cb
Shadow gap: cc
==1326574==ABORTING
```
---
with debugging mode(--debug)
###### Outputs
```
ICE: Assertion 'type == SCANNER_STREAM_TYPE_VAR || type == SCANNER_STREAM_TYPE_LET || type == SCANNER_STREAM_TYPE_CONST || type == SCANNER_STREAM_TYPE_FUNC || is_import' failed at ./jerryscript/jerry-core/parser/js/js-scanner-util.c(scanner_is_context_needed):2080.
Error: JERRY_FATAL_FAILED_ASSERTION
Aborted
```
Credits: @Ye0nny, @EJueon of the seclab-yonsei.
| heap-buffer-overflow in scanner_is_context_needed | https://api.github.com/repos/jerryscript-project/jerryscript/issues/5092/comments | 0 | 2023-06-24T08:32:20Z | 2023-06-24T08:32:20Z | https://github.com/jerryscript-project/jerryscript/issues/5092 | 1,772,536,756 | 5,092 |
[
"jerryscript-project",
"jerryscript"
]
| ###### JerryScript revision
```
05dbbd134c3b9e2482998f267857dd3722001cd7
```
###### Build platform
```
Linux-6.2.15-200.fc37.x86_64-x86_64-with-glibc2.34
clang version 14.0.6 (Red Hat 14.0.6-4.el9_1)
```
###### Build steps
```sh
CC=/usr/bin/clang python3 tools/build.py --clean \
--debug \
--strip=off \
--compile-flag=-fsanitize=address \
--lto=off \
--compile-flag=-g \
--error-messages=on \
--promise-callback=on \
--logging=on \
--line-info=on \
--stack-limit=128
```
###### Test case
```JavaScript
void new Uint8Array(new String());
void new Uint8Array(new Promise(Number.__proto__),new Proxy(new Proxy(new Proxy(new Proxy(new Proxy(new Proxy(Reflect,Reflect),Reflect),Proxy),Reflect),Proxy),Reflect));
void (new Function(`0324--help${new Proxy(Number.MAX_VALUE=new Date(new Proxy(Number.__proto__=new Proxy(new Proxy(new Proxy(new Proxy(new Proxy(new Proxy(new Proxy(Reflect,new Proxy(new Proxy(new Proxy(new Proxy(new Proxy(Reflect,Reflect),Reflect),Reflect),Reflect),Proxy)),Reflect),Proxy),Reflect),Reflect),Number.MAX_VALUE=new Date(new Proxy(Number.__proto__=new Proxy(new Proxy(new Proxy(new Proxy(new Proxy(new Proxy(new Proxy(new Proxy(Reflect,new Proxy(new Proxy(new Proxy(new Proxy(new Proxy(Reflect,Reflect),Proxy),Proxy),Reflect),Reflect)),Reflect),new Proxy(Reflect,Reflect)),Proxy),Reflect),Reflect),Reflect),new Proxy(Reflect,Reflect)),Proxy))),Reflect),Reflect)),Reflect)}`,new Proxy())%new Reflect());
```
###### Execution and Output
Depending on how JerryScript is used a different error message is printed.
**Case 1: Filename or via stdin**
```sh
./build/bin/jerry poc.js
# or
cat poc.js | ./build/bin/jerry
```
Output:
```
ICE: Assertion 'compressed_pointer != JMEM_CP_NULL' failed at /home/rocky/jerryscript/jerry-core/jmem/jmem-allocator.c(jmem_decompress_pointer):216.
Error: JERRY_FATAL_FAILED_ASSERTION
Aborted (core dumped)
```
This is similar to the closed issue #3779
**Case 2: Filename is an absolute path**
```sh
./build/bin/jerry /home/rocky/poc.js
```
Output:
```
Unhandled exception: TypeError: Argument 'this' is not a Date object
0: /home/rocky/poc.js:3:1
ICE: Assertion 'JERRY_CONTEXT (jmem_heap_allocated_size) == 0' failed at /home/rocky/jerryscript/jerry-core/jmem/jmem-heap.c(jmem_heap_finalize):108.
Error: JERRY_FATAL_FAILED_ASSERTION
Aborted (core dumped)
```
This is similar to the open issue #5062
| Assertion 'compressed_pointer != JMEM_CP_NULL' failed | https://api.github.com/repos/jerryscript-project/jerryscript/issues/5091/comments | 0 | 2023-06-12T11:02:35Z | 2023-06-12T11:02:35Z | https://github.com/jerryscript-project/jerryscript/issues/5091 | 1,752,483,191 | 5,091 |
[
"jerryscript-project",
"jerryscript"
]
| This bug report leads to the same error message as in #4919 but 4919 is fixed whereas this is present on the most recent version.
###### JerryScript revision
```
05dbbd134c3b9e2482998f267857dd3722001cd7
```
###### Build platform
```
Linux-6.2.15-200.fc37.x86_64-x86_64-with-glibc2.34
clang version 14.0.6 (Red Hat 14.0.6-4.el9_1)
```
###### Build steps
```sh
CC=/usr/bin/clang python3 tools/build.py --clean \
--debug \
--strip=off \
--compile-flag=-fsanitize=address \
--lto=off \
--compile-flag=-g \
--error-messages=on \
--promise-callback=on \
--logging=on \
--line-info=on \
--stack-limit=128
```
###### Test case
```JavaScript
function Boolean(){
async Boolean => {
return Int8Array;
}
await new Float64Array();
}
function WeakMap(){
await new Boolean();
}
```
###### Execution
```bash
./build/bin/jerry poc.js
```
###### Output
```
ICE: Assertion 'scope_stack_p >= context_p->scope_stack_p' failed at /home/rocky/jerryscript/jerry-core/parser/js/js-parser-statm.c(parser_parse_function_statement):700.
Error: JERRY_FATAL_FAILED_ASSERTION
Aborted (core dumped)
```
| Assertion 'scope_stack_p >= context_p->scope_stack_p' failed | https://api.github.com/repos/jerryscript-project/jerryscript/issues/5090/comments | 0 | 2023-06-08T16:02:11Z | 2023-06-08T16:02:11Z | https://github.com/jerryscript-project/jerryscript/issues/5090 | 1,748,223,729 | 5,090 |
[
"jerryscript-project",
"jerryscript"
]
| This bug report leads to the same error message as in #4936 but 4936 is fixed whereas this is present on the most recent version.
###### JerryScript revision
```
05dbbd134c3b9e2482998f267857dd3722001cd7
```
###### Build platform
```
Linux-6.2.15-200.fc37.x86_64-x86_64-with-glibc2.34
clang version 14.0.6 (Red Hat 14.0.6-4.el9_1)
```
###### Build steps
```sh
CC=/usr/bin/clang python3 tools/build.py --clean \
--debug \
--strip=off \
--compile-flag=-fsanitize=address \
--lto=off \
--compile-flag=-g \
--error-messages=on \
--promise-callback=on \
--logging=on \
--line-info=on \
--stack-limit=128
```
###### Test case
```JavaScript
void Symbol();
async function Symbol(undefined, Function){
void (Int32Array=[Date=[]=[], Date=[]=[], Date=Symbol(), Date=await [], []]=[]+[]);
}
```
###### Execution
```bash
./build/bin/jerry poc.js
```
###### Output
```
ICE: Assertion 'ecma_is_value_object (value)' failed at /home/rocky/jerryscript/jerry-core/ecma/base/ecma-helpers-value.c(ecma_get_object_from_value):821.
Error: JERRY_FATAL_FAILED_ASSERTION
Aborted (core dumped)
```
| Assertion 'ecma_is_value_object (value)' failed | https://api.github.com/repos/jerryscript-project/jerryscript/issues/5089/comments | 0 | 2023-06-08T14:51:58Z | 2024-02-06T07:10:15Z | https://github.com/jerryscript-project/jerryscript/issues/5089 | 1,748,069,758 | 5,089 |
[
"jerryscript-project",
"jerryscript"
]
| ###### JerryScript revision
```
05dbbd134c3b9e2482998f267857dd3722001cd7
```
###### Build platform
```
Linux-6.2.15-200.fc37.x86_64-x86_64-with-glibc2.34
clang version 14.0.6 (Red Hat 14.0.6-4.el9_1)
```
###### Build steps
```sh
CC=/usr/bin/clang python3 tools/build.py --clean \
--debug \
--strip=off \
--compile-flag=-fsanitize=address \
--lto=off \
--compile-flag=-g \
--error-messages=on \
--promise-callback=on \
--logging=on \
--line-info=on \
--stack-limit=128
```
###### Test case
```JavaScript
new Function(0x1234);
function Function(Array){
delete Array[0];
new Function(new Float64Array(100000000));
}
```
###### Execution
```bash
./build/bin/jerry poc.js
```
###### Output
```
ICE: Assertion 'property == ECMA_PROPERTY_TYPE_NOT_FOUND || property == ECMA_PROPERTY_TYPE_NOT_FOUND_AND_STOP' failed at /home/rocky/jerryscript/jerry-core/ecma/operations/ecma-objects-general.c(ecma_op_general_object_delete):105.
Error: JERRY_FATAL_FAILED_ASSERTION
Aborted (core dumped)
```
| Assertion 'property == ECMA_PROPERTY_TYPE_NOT_FOUND || property == ECMA_PROPERTY_TYPE_NOT_FOUND_AND_STOP' failed | https://api.github.com/repos/jerryscript-project/jerryscript/issues/5088/comments | 0 | 2023-06-08T14:44:08Z | 2023-06-08T14:44:08Z | https://github.com/jerryscript-project/jerryscript/issues/5088 | 1,748,056,537 | 5,088 |
[
"jerryscript-project",
"jerryscript"
]
| ###### JerryScript revision
```
05dbbd134c3b9e2482998f267857dd3722001cd7
```
###### Build platform
```
Linux-6.2.15-200.fc37.x86_64-x86_64-with-glibc2.34
clang version 14.0.6 (Red Hat 14.0.6-4.el9_1)
```
###### Build steps
```sh
CC=/usr/bin/clang python3 tools/build.py --clean \
--debug \
--strip=off \
--compile-flag=-fsanitize=address \
--lto=off \
--compile-flag=-g \
--error-messages=on \
--promise-callback=on \
--logging=on \
--line-info=on \
--stack-limit=128
```
###### Test case
```JavaScript
(this.__proto__)=new Proxy(this,new Set());
(g)=new RegExp();
```
###### Execution
```bash
./build/bin/jerry poc.js
```
###### Output
```
ICE: Assertion 'ecma_is_value_boolean (completion)' failed at /home/rocky/jerryscript/jerry-core/ecma/operations/ecma-get-put-value.c(ecma_op_put_value_lex_env_base):314.
Error: JERRY_FATAL_FAILED_ASSERTION
Aborted (core dumped)
``` | Assertion 'ecma_is_value_boolean (completion)' failed | https://api.github.com/repos/jerryscript-project/jerryscript/issues/5087/comments | 0 | 2023-06-08T14:40:58Z | 2023-06-08T14:40:58Z | https://github.com/jerryscript-project/jerryscript/issues/5087 | 1,748,051,424 | 5,087 |
[
"jerryscript-project",
"jerryscript"
]
| ###### JerryScript revision
```
05dbbd134c3b9e2482998f267857dd3722001cd7
```
###### Build platform
```
Linux-6.2.15-200.fc37.x86_64-x86_64-with-glibc2.34
clang version 14.0.6 (Red Hat 14.0.6-4.el9_1)
```
###### Build steps
```sh
CC=/usr/bin/clang python3 tools/build.py --clean \
--debug \
--strip=off \
--compile-flag=-fsanitize=address \
--lto=off \
--compile-flag=-g \
--error-messages=on \
--promise-callback=on \
--logging=on \
--line-info=on \
--stack-limit=128
```
###### Test case
```JavaScript
eval("999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999100000000999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999\x6E\x25999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999\x6E\x2BhasOwnProperty")
```
###### Execution
```bash
./build/bin/jerry poc.js
```
###### Output
```
ICE: Assertion 'dividend_end_p[0] == divisor_high && dividend_end_p[-1] < divisor_high' failed at /home/rocky/jerryscript/jerry-core/ecma/operations/ecma-big-uint.c(ecma_big_uint_div_mod):1119.
Error: JERRY_FATAL_FAILED_ASSERTION
Aborted (core dumped)
``` | Assertion 'dividend_end_p[0] == divisor_high && dividend_end_p[-1] < divisor_high' failed | https://api.github.com/repos/jerryscript-project/jerryscript/issues/5086/comments | 0 | 2023-06-08T14:38:17Z | 2023-06-08T14:38:17Z | https://github.com/jerryscript-project/jerryscript/issues/5086 | 1,748,045,601 | 5,086 |
[
"jerryscript-project",
"jerryscript"
]
| ###### JerryScript revision
```
05dbbd134c3b9e2482998f267857dd3722001cd7
```
###### Build platform
```
Linux-6.2.15-200.fc37.x86_64-x86_64-with-glibc2.34
clang version 14.0.6 (Red Hat 14.0.6-4.el9_1)
```
###### Build steps
```sh
CC=/usr/bin/clang python3 tools/build.py --clean \
--debug \
--strip=off \
--compile-flag=-fsanitize=address \
--lto=off \
--compile-flag=-g \
--error-messages=on \
--promise-callback=on \
--logging=on \
--line-info=on \
--stack-limit=128
```
###### Test case
```JavaScript
class RegExp{
}
async () => {
Set;
}
await Symbol;
class Set{
}
```
###### Execution
```bash
./build/bin/jerry poc.js
```
###### Output
```
AddressSanitizer:DEADLYSIGNAL
=================================================================
==4093==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000010 (pc 0x00000072bb10 bp 0x7fffd82d4130 sp 0x7fffd82d3dc0 T0)
==4093==The signal is caused by a READ memory access.
==4093==Hint: address points to the zero page.
#0 0x72bb10 in parser_parse_class /home/rocky/jerryscript/jerry-core/parser/js/js-parser-expr.c:1107:38
#1 0x750031 in parser_parse_statements /home/rocky/jerryscript/jerry-core/parser/js/js-parser-statm.c:2787:9
#2 0x64411b in parser_parse_source /home/rocky/jerryscript/jerry-core/parser/js/js-parser.c:2280:5
#3 0x6408a2 in parser_parse_script /home/rocky/jerryscript/jerry-core/parser/js/js-parser.c:3326:38
#4 0x53ce99 in jerry_parse_common /home/rocky/jerryscript/jerry-core/api/jerryscript.c:412:21
#5 0x53ca07 in jerry_parse /home/rocky/jerryscript/jerry-core/api/jerryscript.c:480:10
#6 0x77038c in jerryx_source_parse_script /home/rocky/jerryscript/jerry-ext/util/sources.c:52:26
#7 0x7704b4 in jerryx_source_exec_script /home/rocky/jerryscript/jerry-ext/util/sources.c:63:26
#8 0x536b9f in main /home/rocky/jerryscript/jerry-main/main-desktop.c:156:20
#9 0x7fba61a87eaf in __libc_start_call_main (/lib64/libc.so.6+0x3feaf) (BuildId: 82f7ae28e16376aa97cc3bf50b40ab2d1043924a)
#10 0x7fba61a87f5f in __libc_start_main@GLIBC_2.2.5 (/lib64/libc.so.6+0x3ff5f) (BuildId: 82f7ae28e16376aa97cc3bf50b40ab2d1043924a)
#11 0x43c604 in _start (/home/rocky/jerryscript/build/bin/jerry+0x43c604) (BuildId: 1da1efd61105afed74f3a1d623bc459cc93ece58)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /home/rocky/jerryscript/jerry-core/parser/js/js-parser-expr.c:1107:38 in parser_parse_class
==4093==ABORTING
```
| Segmentation fault - js-parser-expr.c in parser_parse_class | https://api.github.com/repos/jerryscript-project/jerryscript/issues/5085/comments | 0 | 2023-06-08T14:32:42Z | 2024-01-31T23:34:38Z | https://github.com/jerryscript-project/jerryscript/issues/5085 | 1,748,030,281 | 5,085 |
[
"jerryscript-project",
"jerryscript"
]
| ###### JerryScript revision
Commit: https://github.com/jerryscript-project/jerryscript/commit/05dbbd134c3b9e2482998f267857dd3722001cd7
Version: v3.0.0
###### Build platform
Ubuntu 20.04.5 LTS (Linux 5.4.0-144-generic x86_64)
###### Build steps
```sh
python ./tools/build.py --clean --debug --compile-flag=-m32 --compile-flag=-fno-omit-frame-pointer --compile-flag=-fno-common --compile-flag=-fsanitize=address --compile-flag=-g --strip=off --lto=off --error-messages=on --system-allocator=on --logging=on --line-info=on --stack-limit=20
```
###### Test case
<details><summary>testcase</summary>
<p>
```javascript
var r = function ( func0 , a ) {
for ( var v in a || { } ) {
r [ v ] = a [ v ] ;
} return r ;
} ;
var a = [ ] ;
for ( var v = 0 ; v < 256 ; v ++ ) {
var n = Object . create ( null ) ;
a . push ( n , a ) ;
n . v = 1 ;
n . o = 1 ;
n = new WeakSet ( a ) ;
n . t = 1 ;
n . o = 1 ;
}
n . i = 1 ;
if ( ! a ) throw new Test262Error ( " out " ) ;
n . O = 1 ;
n . m = 1 ;
n = JSON . stringify ( JSON . stringify ( n , a ) ) ;
if ( r . deref != 1 ) throw new Test262Error ( " digit " ) ;
n . h = 1 ;
n . T = 1 ;
n . U = 1 ;
n . g = 1 ;
n . j = 1 ;
n . k = 1 ;
n . m = 1 ;
n . p = 1 ;
n . q = 1 ;
n . A = 1 ;
n . B = 1 ;
n . as = 1 ;
n . C = 1 ;
n . A = 1 ;
n . q = 0.1 ;
n . D = 1 ;
n . F = 1 ;
n . G = 1 ;
n . ax = 1 ;
n . ax = 1 ;
n . H = 1 ;
n . I = 1 ;
n . J = 1 ;
n . K = 1 ;
n . L = 1 ;
n . M = 1 ;
n . N = 1 ;
var o = Object . create ( n ) ;
var f = r ( { } , o ) ;
for ( var t in f ) {
if ( f [ t ] !== f [ " " ] ) {
if ( f [ t ] !== f [ " " + t ] ) {
throw new Error ( " OUT " ) ;
}
}
}
```
</p>
</details>
```javascript
// poc.js
var a = [ ] ;
for ( var v = 0 ; v < 256 ; v ++ ) {
var n = Object . create ( null ) ;
a . push ( n , a ) ;
n = new WeakSet ( a ) ;
n . o = 1 ;
}
```
###### Execution steps & Output
```
$ ./jerryscript/build/bin/jerry poc.js
ICE: Assertion 'ECMA_PROPERTY_IS_PROPERTY_PAIR (prop_iter_p)' failed at ./jerryscript/jerry-core/ecma/base/ecma-property-hashmap.c(ecma_property_hashmap_create):146.
Error: JERRY_FATAL_FAILED_ASSERTION
Aborted
```
###### Backtrace
```
(gdb) bt
#0 0xf7fcfd99 in __kernel_vsyscall ()
#1 0xf7ca4276 in raise () from /lib32/libc.so.6
#2 0xf7c8c3f7 in abort () from /lib32/libc.so.6
#3 0x083ecca3 in jerry_port_fatal (code=JERRY_FATAL_FAILED_ASSERTION) at ./jerryscript/jerry-port/common/jerry-port-process.c:29
#4 0x08260d02 in jerry_fatal (code=JERRY_FATAL_FAILED_ASSERTION) at ./jerryscript/jerry-core/jrt/jrt-fatals.c:63
#5 0x08260d64 in jerry_assert_fail (assertion=0x8418d00 <str> "ECMA_PROPERTY_IS_PROPERTY_PAIR (prop_iter_p)",
file=0x8418d60 <str> "./jerryscript/jerry-core/ecma/base/ecma-property-hashmap.c", function=0x8418de0 <__func__.ecma_property_hashmap_create> "ecma_property_hashmap_create",
line=146) at ./jerryscript/jerry-core/jrt/jrt-fatals.c:83
#6 0x081a3e63 in ecma_property_hashmap_create (object_p=0xf5500880) at ./jerryscript/jerry-core/ecma/base/ecma-property-hashmap.c:146
#7 0x081a4342 in ecma_property_hashmap_insert (object_p=0xf5500880, name_p=0x3815, property_pair_p=0xf2d1a140, property_index=0)
at ./jerryscript/jerry-core/ecma/base/ecma-property-hashmap.c:236
#8 0x08189d0a in ecma_create_property (object_p=<optimized out>, name_p=<optimized out>, type_and_flags=<optimized out>, value=..., out_prop_p=<optimized out>)
at ./jerryscript/jerry-core/ecma/base/ecma-helpers.c:448
#9 0x0818836a in ecma_create_named_data_property (object_p=0xf5500880, name_p=0x3815, prop_attributes=7 '\a', out_prop_p=0x0)
at ./jerryscript/jerry-core/ecma/base/ecma-helpers.c:536
#10 0x08217e4e in ecma_op_object_put_apply_receiver (receiver=<optimized out>, property_name_p=<optimized out>, value=<optimized out>, is_throw=<optimized out>)
at ./jerryscript/jerry-core/ecma/operations/ecma-objects.c:1241
#11 0x08216a71 in ecma_op_object_put_with_receiver (object_p=<optimized out>, property_name_p=<optimized out>, value=<optimized out>, receiver=<optimized out>, is_throw=<optimized out>)
at ./jerryscript/jerry-core/ecma/operations/ecma-objects.c:1595
#12 0x08214f3a in ecma_op_object_put (object_p=0xf5500880, property_name_p=0x3815, value=<optimized out>, is_throw=<optimized out>)
at ./jerryscript/jerry-core/ecma/operations/ecma-objects.c:1143
#13 ecma_op_object_put_by_index (object_p=0xf5500880, index=448, value=4117759059, is_throw=<optimized out>) at ./jerryscript/jerry-core/ecma/operations/ecma-objects.c:1109
#14 0x0830d9b1 in ecma_builtin_array_prototype_object_push (argument_list_p=<optimized out>, arguments_number=2, obj_p=0xf5500880, length=448)
at ./jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-array-prototype.c:465
#15 ecma_builtin_array_prototype_dispatch_routine (builtin_routine_id=<optimized out>, this_arg=<optimized out>, arguments_list_p=<optimized out>, arguments_number=<optimized out>)
at ./jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-array-prototype.c:2839
#16 0x081b94a5 in ecma_builtin_dispatch_routine (func_obj_p=<optimized out>, this_arg_value=<optimized out>, arguments_list_p=0xffffce30, arguments_list_len=<optimized out>)
at ./jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1460
#17 ecma_builtin_dispatch_call (obj_p=<optimized out>, this_arg_value=<optimized out>, arguments_list_p=<optimized out>, arguments_list_len=<optimized out>)
at ./jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1489
#18 0x081fb6b8 in ecma_op_function_call_native_built_in (func_obj_p=0xf5500790, this_arg_value=4115662979, arguments_list_p=0xffffd054, arguments_list_len=2)
at ./jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1217
#19 0x081fa81d in ecma_op_function_call (func_obj_p=0xf5500790, this_arg_value=4115662979, arguments_list_p=0xffffd054, arguments_list_len=2)
at ./jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1411
#20 0x081fa5cf in ecma_op_function_validated_call (callee=4115662739, this_arg_value=4115662979, arguments_list_p=0xffffd054, arguments_list_len=2)
at ./jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1371
#21 0x082d7631 in opfunc_call (frame_ctx_p=<optimized out>) at ./jerryscript/jerry-core/vm/vm.c:758
#22 vm_execute (frame_ctx_p=0xffffd020) at ./jerryscript/jerry-core/vm/vm.c:5217
#23 0x082d4f62 in vm_run (shared_p=0xffffd110, this_binding_value=4119870595, lex_env_p=0xf57007b0) at ./jerryscript/jerry-core/vm/vm.c:5312
#24 0x082d4c39 in vm_run_global (bytecode_p=<optimized out>, function_object_p=<optimized out>) at ./jerryscript/jerry-core/vm/vm.c:286
#25 0x0812a4e5 in jerry_run (script=4115663075) at ./jerryscript/jerry-core/api/jerryscript.c:548
#26 0x083eac3f in jerryx_source_exec_script (path_p=0xffffd5df "poc.js") at ./jerryscript/jerry-ext/util/sources.c:68
#27 0x0812162d in main (argc=<optimized out>, argv=<optimized out>) at ./jerryscript/jerry-main/main-desktop.c:156
(gdb)
```
---
with release mode
###### Outputs
```
AddressSanitizer:DEADLYSIGNAL
=================================================================
==1512811==ERROR: AddressSanitizer: SEGV on unknown address 0x0000023e (pc 0x5659bb0f bp 0xff8ef1d8 sp 0xff8ef190 T0)
==1512811==The signal is caused by a READ memory access.
==1512811==Hint: address points to the zero page.
#0 0x5659bb0e in ecma_gc_mark_properties ./jerryscript/jerry-core/ecma/base/ecma-gc.c:287
#1 0x5659e95d in ecma_gc_run ./jerryscript/jerry-core/ecma/base/ecma-gc.c:2158
#2 0x565f3d83 in jmem_heap_gc_and_alloc_block ./jerryscript/jerry-core/jmem/jmem-heap.c:285
#3 0x566365ad in ecma_alloc_property_pair ./jerryscript/jerry-core/ecma/base/ecma-alloc.c:253
#4 0x565ac30d in ecma_create_property ./jerryscript/jerry-core/ecma/base/ecma-helpers.c:457
#5 0x565d424d in ecma_create_iter_result_object ./jerryscript/jerry-core/ecma/operations/ecma-iterator-object.c:98
#6 0x56636d82 in ecma_builtin_array_iterator_prototype_object_next ./jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-array-iterator-prototype.c:172
#7 0x56636d82 in ecma_builtin_array_iterator_prototype_dispatch_routine ./jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-array-iterator-prototype.c:211
#8 0x565bba28 in ecma_builtin_dispatch_routine ./jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1460
#9 0x565bba28 in ecma_builtin_dispatch_call ./jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1489
#10 0x565d0db7 in ecma_op_function_call_native_built_in ./jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1217
#11 0x565d2c84 in ecma_op_function_call ./jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1411
#12 0x565d449d in ecma_op_iterator_next ./jerryscript/jerry-core/ecma/operations/ecma-iterator-object.c:317
#13 0x565d46d3 in ecma_op_iterator_step ./jerryscript/jerry-core/ecma/operations/ecma-iterator-object.c:559
#14 0x565ca92e in ecma_op_container_create ./jerryscript/jerry-core/ecma/operations/ecma-container-object.c:435
#15 0x56657dbd in ecma_builtin_weakset_dispatch_construct ./jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-weakset.c:62
#16 0x565d3086 in ecma_op_function_construct_built_in ./jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1537
#17 0x565d3086 in ecma_op_function_construct ./jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1717
#18 0x56634c33 in opfunc_construct ./jerryscript/jerry-core/vm/vm.c:840
#19 0x56634c33 in vm_execute ./jerryscript/jerry-core/vm/vm.c:5236
#20 0x56635152 in vm_run ./jerryscript/jerry-core/vm/vm.c:5312
#21 0x5663538f in vm_run_global ./jerryscript/jerry-core/vm/vm.c:286
#22 0x5659382e in jerry_run ./jerryscript/jerry-core/api/jerryscript.c:548
#23 0x5668871b in jerryx_source_exec_script ./jerryscript/jerry-ext/util/sources.c:68
#24 0x5658bd04 in main ./jerryscript/jerry-main/main-desktop.c:156
#25 0xf76ceed4 in __libc_start_main (/lib32/libc.so.6+0x1aed4)
#26 0x5658efb4 in _start (/./jerryscript/build/bin/jerry+0x12fb4)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV ./jerryscript/jerry-core/ecma/base/ecma-gc.c:287 in ecma_gc_mark_properties
==1512811==ABORTING
```
Credits: @Ye0nny, @EJueon of the seclab-yonsei.
| Assertion 'ECMA_PROPERTY_IS_PROPERTY_PAIR (prop_iter_p)' failed at ./jerryscript/jerry-core/ecma/base/ecma-property-hashmap.c(ecma_property_hashmap_create) | https://api.github.com/repos/jerryscript-project/jerryscript/issues/5084/comments | 0 | 2023-06-05T11:59:55Z | 2023-06-05T11:59:55Z | https://github.com/jerryscript-project/jerryscript/issues/5084 | 1,741,623,530 | 5,084 |
[
"jerryscript-project",
"jerryscript"
]
| ###### JerryScript revision
Commit: https://github.com/jerryscript-project/jerryscript/commit/05dbbd134c3b9e2482998f267857dd3722001cd7
Version: v3.0.0
###### Build platform
Ubuntu 20.04.5 LTS (Linux 5.4.0-144-generic x86_64)
###### Build steps
```sh
python ./tools/build.py --clean --debug --compile-flag=-m32 --compile-flag=-fno-omit-frame-pointer --compile-flag=-fno-common --compile-flag=-fsanitize=address --compile-flag=-g --strip=off --lto=off --error-messages=on --system-allocator=on --logging=on --line-info=on --stack-limit=20
```
###### Test case
<details><summary>testcase</summary>
<p>
```javascript
var r = { } ;
var t = [ r , r , r , r , r , r , r , r , r , r , r , r , r , r , r ] ;
var a = [ ] ;
const e = 8 ;
for ( var n = 0 ; n < 8 ; ++ n ) {
for ( var o = 0 ; o < t . length ; ++ o ) {
a . push ( String . prototype . indexOf . call ( t [ n ] , " object " ) ) ;
}
}
a [ 8 ] = a = [ ] ;
8 * t , f . length ;
var c = class extends c { static { } ; } ;
for ( var n = 0 ; n < a . length ; ++ n ) {
var f = { } , t = f ;
r = 0 ;
r += a [ n ] ;
1 ;
}
```
</p>
</details>
```javascript
// poc.js
var c = class extends c { static { } ; } ;
for ( var n = 0 ; n < a . length ; ++ n ) {
r += a [ n ] ;
}
```
###### Execution steps & Output
```
$ ./jerryscript/build/bin/jerry poc.js
ICE: Assertion 'context_p->token.type != LEXER_RIGHT_PAREN' failed at ./jerryscript/jerry-core/parser/js/js-parser-statm.c(parser_parse_for_statement_start):1502.
Error: JERRY_FATAL_FAILED_ASSERTION
Aborted
```
###### Backtrace
```
(gdb) bt
#0 0xf7fcfd99 in __kernel_vsyscall ()
#1 0xf7ca4276 in raise () from /lib32/libc.so.6
#2 0xf7c8c3f7 in abort () from /lib32/libc.so.6
#3 0x083ecca3 in jerry_port_fatal (code=JERRY_FATAL_FAILED_ASSERTION)
at ./jerryscript/jerry-port/common/jerry-port-process.c:29
#4 0x08260d02 in jerry_fatal (code=JERRY_FATAL_FAILED_ASSERTION)
at ./jerryscript/jerry-core/jrt/jrt-fatals.c:63
#5 0x08260d64 in jerry_assert_fail (assertion=0x8479a60 <str> "context_p->token.type != LEXER_RIGHT_PAREN",
file=0x84789e0 <str> "./jerryscript/jerry-core/parser/js/js-parser-statm.c",
function=0x8479b20 <__func__.parser_parse_for_statement_start> "parser_parse_for_statement_start", line=1502)
at ./jerryscript/jerry-core/jrt/jrt-fatals.c:83
#6 0x083d5567 in parser_parse_for_statement_start (context_p=<optimized out>)
at ./jerryscript/jerry-core/parser/js/js-parser-statm.c:1502
#7 parser_parse_statements (context_p=<optimized out>)
at ./jerryscript/jerry-core/parser/js/js-parser-statm.c:2851
#8 0x08284a26 in parser_parse_source (source_p=0xffffd030, parse_opts=<optimized out>, options_p=0xffffd100)
at ./jerryscript/jerry-core/parser/js/js-parser.c:2280
#9 0x08282c70 in parser_parse_script (source_p=0xffffd030, parse_opts=0, options_p=0xffffd100)
at ./jerryscript/jerry-core/parser/js/js-parser.c:3326
#10 0x08129a7d in jerry_parse_common (source_p=0xffffd030, options_p=<optimized out>, parse_opts=0)
at ./jerryscript/jerry-core/api/jerryscript.c:412
#11 0x08129698 in jerry_parse (source_p=<optimized out>, source_size=<optimized out>, options_p=<optimized out>)
at ./jerryscript/jerry-core/api/jerryscript.c:480
#12 0x083ea952 in jerryx_source_parse_script (path_p=<optimized out>)
at ./jerryscript/jerry-ext/util/sources.c:52
#13 0x083eac12 in jerryx_source_exec_script (path_p=0xffffd5da "poc.js")
at ./jerryscript/jerry-ext/util/sources.c:63
#14 0x0812162d in main (argc=<optimized out>, argv=<optimized out>)
at ./jerryscript/jerry-main/main-desktop.c:156
(gdb)
```
Credits: @Ye0nny, @EJueon of the seclab-yonsei.
| Assertion 'context_p->token.type != LEXER_RIGHT_PAREN' failed at ./jerryscript/jerry-core/parser/js/js-parser-statm.c(parser_parse_for_statement_start) | https://api.github.com/repos/jerryscript-project/jerryscript/issues/5083/comments | 0 | 2023-05-31T12:11:34Z | 2023-05-31T12:11:34Z | https://github.com/jerryscript-project/jerryscript/issues/5083 | 1,734,082,739 | 5,083 |
[
"jerryscript-project",
"jerryscript"
]
| As stated in the title,why thers is test262-es6-excludelist.xml | what dose test262-es6-excludelist.xml can do? | https://api.github.com/repos/jerryscript-project/jerryscript/issues/5082/comments | 0 | 2023-05-27T02:36:24Z | 2023-05-27T02:36:24Z | https://github.com/jerryscript-project/jerryscript/issues/5082 | 1,728,414,825 | 5,082 |
[
"jerryscript-project",
"jerryscript"
]
| I'm trying to build jerryscript for the esp32. Due to the fact that the esp32 has no 64-Bit FPU, doubles are very slow. Sadly the JERRY_NUMBER_TYPE_FLOAT64=0 config option seems to be broken and there are multiple compile errors, even when specifying JERRY_BUILTIN_DATE=0. There seem to be multiple issues, fixing the first one about the semicolon isn't enough and I don't know how to fix the rest.
To reproduce this, just checkout the latest commit, edit jerry-core/config.h and add the following lines:
```C++
#define JERRY_BUILTIN_DATE 0
#define JERRY_NUMBER_TYPE_FLOAT64
```
###### JerryScript revision
05dbbd134c3b9e2482998f267857dd3722001cd7
###### Build platform
"Arch Linux" (Linux 6.3.1-arch2-1 x86_64
###### Build steps
```sh
tools/build.py
```
###### Build log
```
In file included from /home/vayu/Programs/jerryscript/jerry-core/ecma/base/ecma-helpers-number.c:16:
/home/vayu/Programs/jerryscript/jerry-core/ecma/base/ecma-helpers-number.c: In function ‘ecma_number_sign’:
/home/vayu/Programs/jerryscript/jerry-core/ecma/base/ecma-helpers-number.h:106:41: error: expected ‘)’ before ‘;’ token
106 | #define ECMA_NUMBER_SIGN_BIT 0x7f800000u;
| ^
/home/vayu/Programs/jerryscript/jerry-core/ecma/base/ecma-helpers-number.c:79:20: note: in expansion of macro ‘ECMA_NUMBER_SIGN_BIT’
79 | return (binary & ECMA_NUMBER_SIGN_BIT) != 0;
| ^~~~~~~~~~~~~~~~~~~~
/home/vayu/Programs/jerryscript/jerry-core/ecma/base/ecma-helpers-number.c:79:10: note: to match this ‘(’
79 | return (binary & ECMA_NUMBER_SIGN_BIT) != 0;
| ^
/home/vayu/Programs/jerryscript/jerry-core/ecma/base/ecma-helpers-number.c: In function ‘ecma_number_biased_exp’:
/home/vayu/Programs/jerryscript/jerry-core/ecma/base/ecma-helpers-number.h:106:41: error: expected ‘)’ before ‘;’ token
106 | #define ECMA_NUMBER_SIGN_BIT 0x7f800000u;
| ^
/home/vayu/Programs/jerryscript/jerry-core/ecma/base/ecma-helpers-number.c:90:33: note: in expansion of macro ‘ECMA_NUMBER_SIGN_BIT’
90 | return (uint32_t) ((binary & ~ECMA_NUMBER_SIGN_BIT) >> ECMA_NUMBER_FRACTION_WIDTH);
| ^~~~~~~~~~~~~~~~~~~~
/home/vayu/Programs/jerryscript/jerry-core/ecma/base/ecma-helpers-number.c:90:22: note: to match this ‘(’
90 | return (uint32_t) ((binary & ~ECMA_NUMBER_SIGN_BIT) >> ECMA_NUMBER_FRACTION_WIDTH);
| ^
/home/vayu/Programs/jerryscript/jerry-core/ecma/base/ecma-helpers-number.c: In function ‘ecma_number_create’:
/home/vayu/Programs/jerryscript/jerry-core/ecma/base/ecma-helpers-number.c:120:13: error: conversion from ‘uint64_t’ {aka ‘long unsigned int’} to ‘ecma_binary_num_t’ {aka ‘unsigned int’} may change value [-Werror=conversion]
120 | binary |= fraction;
| ^~~~~~~~
/home/vayu/Programs/jerryscript/jerry-core/ecma/base/ecma-helpers-number.c: In function ‘ecma_number_is_negative’:
/home/vayu/Programs/jerryscript/jerry-core/ecma/base/ecma-helpers-number.h:106:41: error: expected ‘)’ before ‘;’ token
106 | #define ECMA_NUMBER_SIGN_BIT 0x7f800000u;
| ^
/home/vayu/Programs/jerryscript/jerry-core/ecma/base/ecma-helpers-number.c:200:41: note: in expansion of macro ‘ECMA_NUMBER_SIGN_BIT’
200 | return (ecma_number_to_binary (num) & ECMA_NUMBER_SIGN_BIT) != 0;
| ^~~~~~~~~~~~~~~~~~~~
/home/vayu/Programs/jerryscript/jerry-core/ecma/base/ecma-helpers-number.c:200:10: note: to match this ‘(’
200 | return (ecma_number_to_binary (num) & ECMA_NUMBER_SIGN_BIT) != 0;
| ^
/home/vayu/Programs/jerryscript/jerry-core/ecma/base/ecma-helpers-number.c: In function ‘ecma_number_is_infinity’:
/home/vayu/Programs/jerryscript/jerry-core/ecma/base/ecma-helpers-number.h:106:41: error: expected ‘)’ before ‘;’ token
106 | #define ECMA_NUMBER_SIGN_BIT 0x7f800000u;
| ^
/home/vayu/Programs/jerryscript/jerry-core/ecma/base/ecma-helpers-number.c:232:42: note: in expansion of macro ‘ECMA_NUMBER_SIGN_BIT’
232 | return (ecma_number_to_binary (num) & ~ECMA_NUMBER_SIGN_BIT) == ECMA_NUMBER_BINARY_INF;
| ^~~~~~~~~~~~~~~~~~~~
/home/vayu/Programs/jerryscript/jerry-core/ecma/base/ecma-helpers-number.c:232:10: note: to match this ‘(’
232 | return (ecma_number_to_binary (num) & ~ECMA_NUMBER_SIGN_BIT) == ECMA_NUMBER_BINARY_INF;
| ^
/home/vayu/Programs/jerryscript/jerry-core/ecma/base/ecma-helpers-number.c:232:64: error: bitwise comparison always evaluates to false [-Werror=tautological-compare]
232 | return (ecma_number_to_binary (num) & ~ECMA_NUMBER_SIGN_BIT) == ECMA_NUMBER_BINARY_INF;
| ^~
/home/vayu/Programs/jerryscript/jerry-core/ecma/base/ecma-helpers-number.c: In function ‘ecma_number_get_prev’:
/home/vayu/Programs/jerryscript/jerry-core/ecma/base/ecma-helpers-number.c:262:10: error: conversion from ‘double’ to ‘ecma_number_t’ {aka ‘float’} may change value [-Werror=float-conversion]
262 | return __builtin_nextafter (num, -INFINITY);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/vayu/Programs/jerryscript/jerry-core/ecma/base/ecma-helpers-number.c: In function ‘ecma_number_get_next’:
/home/vayu/Programs/jerryscript/jerry-core/ecma/base/ecma-helpers-number.c:297:10: error: conversion from ‘double’ to ‘ecma_number_t’ {aka ‘float’} may change value [-Werror=float-conversion]
297 | return __builtin_nextafter (num, INFINITY);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/vayu/Programs/jerryscript/jerry-core/ecma/base/ecma-helpers-number.c: In function ‘ecma_number_trunc’:
/home/vayu/Programs/jerryscript/jerry-core/ecma/base/ecma-helpers-number.c:348:13: error: conversion from ‘long long unsigned int’ to ‘ecma_binary_num_t’ {aka ‘unsigned int’} may change value [-Werror=conversion]
348 | binary &= ~((1ull << (ECMA_NUMBER_FRACTION_WIDTH - unbiased_exp)) - 1);
| ^
/home/vayu/Programs/jerryscript/jerry-core/ecma/base/ecma-helpers-number.c: In function ‘ecma_number_parse_int’:
/home/vayu/Programs/jerryscript/jerry-core/ecma/base/ecma-helpers-number.c:545:11: error: conversion from ‘int32_t’ {aka ‘int’} to ‘ecma_number_t’ {aka ‘float’} may change value [-Werror=conversion]
545 | value *= radix;
| ^~
/home/vayu/Programs/jerryscript/jerry-core/ecma/base/ecma-helpers-number.c:546:11: error: conversion from ‘int32_t’ {aka ‘int’} to ‘ecma_number_t’ {aka ‘float’} may change value [-Werror=conversion]
546 | value += digit;
| ^~
/home/vayu/Programs/jerryscript/jerry-core/ecma/base/ecma-helpers-conversion.c: In function ‘ecma_utf8_string_to_number_by_radix’:
/home/vayu/Programs/jerryscript/jerry-core/ecma/base/ecma-helpers-conversion.c:333:15: error: conversion from ‘uint32_t’ {aka ‘unsigned int’} to ‘ecma_number_t’ {aka ‘float’} may change value [-Werror=conversion]
333 | num = num * radix + value;
| ^
/home/vayu/Programs/jerryscript/jerry-core/ecma/base/ecma-helpers-conversion.c:333:23: error: conversion from ‘uint32_t’ {aka ‘unsigned int’} to ‘ecma_number_t’ {aka ‘float’} may change value [-Werror=conversion]
333 | num = num * radix + value;
| ^
cc1: all warnings being treated as errors
make[2]: *** [jerry-core/CMakeFiles/jerry-core.dir/build.make:272: jerry-core/CMakeFiles/jerry-core.dir/ecma/base/ecma-helpers-number.c.o] Error 1
make[2]: *** Waiting for unfinished jobs....
/home/vayu/Programs/jerryscript/jerry-core/ecma/base/ecma-helpers-conversion.c: In function ‘ecma_utf8_string_to_number’:
/home/vayu/Programs/jerryscript/jerry-core/ecma/base/ecma-helpers-conversion.c:630:50: error: ‘fraction_uint64’ undeclared (first use in this function)
630 | ecma_number_t num = (ecma_number_t) (uint32_t) fraction_uint64;
| ^~~~~~~~~~~~~~~
/home/vayu/Programs/jerryscript/jerry-core/ecma/base/ecma-helpers-conversion.c:630:50: note: each undeclared identifier is reported only once for each function it appears in
/home/vayu/Programs/jerryscript/jerry-core/ecma/base/ecma-helpers-conversion.c:632:21: error: ‘e_sign’ undeclared (first use in this function); did you mean ‘sign’?
632 | ecma_number_t m = e_sign ? (ecma_number_t) 0.1 : (ecma_number_t) 10.0;
| ^~~~~~
| sign
/home/vayu/Programs/jerryscript/jerry-core/ecma/base/ecma-helpers-conversion.c:634:10: error: ‘e’ undeclared (first use in this function)
634 | while (e)
| ^
[ 13%] Building C object jerry-core/CMakeFiles/jerry-core.dir/ecma/builtin-objects/ecma-builtin-bigint-prototype.c.o
cc1: all warnings being treated as errors
make[2]: *** [jerry-core/CMakeFiles/jerry-core.dir/build.make:230: jerry-core/CMakeFiles/jerry-core.dir/ecma/base/ecma-helpers-conversion.c.o] Error 1
/home/vayu/Programs/jerryscript/jerry-core/api/jerryscript.c: In function ‘jerry_value_as_integer’:
/home/vayu/Programs/jerryscript/jerry-core/api/jerryscript.c:2251:27: error: conversion from ‘double’ to ‘ecma_number_t’ {aka ‘float’} may change value [-Werror=float-conversion]
2251 | if (ecma_number_is_nan (number))
| ^~~~~~
/home/vayu/Programs/jerryscript/jerry-core/api/jerryscript.c:2256:28: error: conversion from ‘double’ to ‘ecma_number_t’ {aka ‘float’} may change value [-Werror=float-conversion]
2256 | if (ecma_number_is_zero (number) || ecma_number_is_infinity (number))
| ^~~~~~
/home/vayu/Programs/jerryscript/jerry-core/api/jerryscript.c:2256:64: error: conversion from ‘double’ to ‘ecma_number_t’ {aka ‘float’} may change value [-Werror=float-conversion]
2256 | if (ecma_number_is_zero (number) || ecma_number_is_infinity (number))
| ^~~~~~
/home/vayu/Programs/jerryscript/jerry-core/api/jerryscript.c:2263:35: error: conversion from ‘double’ to ‘ecma_number_t’ {aka ‘float’} may change value [-Werror=float-conversion]
2263 | return ecma_number_is_negative (number) ? -floor_fabs : floor_fabs;
| ^~~~~~
cc1: all warnings being treated as errors
make[2]: *** [jerry-core/CMakeFiles/jerry-core.dir/build.make:132: jerry-core/CMakeFiles/jerry-core.dir/api/jerryscript.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:179: jerry-core/CMakeFiles/jerry-core.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
==============================
Build failed with exit code: 2
==============================
```
| Compile error when using JERRY_NUMBER_TYPE_FLOAT64=0 | https://api.github.com/repos/jerryscript-project/jerryscript/issues/5081/comments | 0 | 2023-05-22T22:52:44Z | 2023-05-22T22:52:44Z | https://github.com/jerryscript-project/jerryscript/issues/5081 | 1,720,750,605 | 5,081 |
[
"jerryscript-project",
"jerryscript"
]
| ###### JerryScript revision
Version: v3.0.0
###### Build platform
Linux cqian-s2 5.4.0-148-generic #165-Ubuntu SMP Tue Apr 18 08:53:12 UTC 2023 x86_64 x86_64 x86_64 GNU/Linu
###### Build steps
python ./tools/build.py --clean --debug --compile-flag=-m32 --compile-flag=-fno-omit-frame-pointer --compile-flag=-fno-common --compile-flag=-fsanitize=address --compile-flag=-g --strip=off --lto=off --error-messages=on --system-allocator=on --logging=on --line-info=on --stack-limit=20
###### Test case
```
let evil = new RegExp();
evil.exec = () => ({ 0: "1234567", length: 1, index: 0 });
"abc".replace(evil, "$'");
```
###### Execution platform
Unnecessary if the same as the build platform.
###### Execution steps
List the steps that trigger the bug.
E.g., if a bug is snapshot-specific:
```sh
build/bin/jerry-snapshot generate -o testcase.js.snapshot testcase.js
build/bin/jerry --exec-snapshot testcase.js.snapshot
```
###### Output
SEGMENT
###### Backtrace
```
==1327323==ERROR: AddressSanitizer: memcpy-param-overlap: memory ranges [0x55fb3005c209,0x55fc3005c205) and [0x55fc3005c0f8, 0x55fd3005c0f4) overlap
#0 0x7fc34e7684ed in __interceptor_memcpy ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:823
#1 0x55fc2ff5cea1 in memcpy /usr/include/x86_64-linux-gnu/bits/string_fortified.h:34
#2 0x55fc2ff5cea1 in ecma_stringbuilder_append_raw /home2/dingjie/jsfuzz/fuzz_target/jerryscript/jerry-core/ecma/base/ecma-helpers-string.c:2609
#3 0x55fc2ffe19b0 in ecma_builtin_replace_substitute /home2/dingjie/jsfuzz/fuzz_target/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-helpers.c:982
#4 0x55fc2ffe9c25 in ecma_regexp_replace_helper /home2/dingjie/jsfuzz/fuzz_target/jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:2924
#5 0x55fc2ffe9c25 in ecma_builtin_regexp_prototype_dispatch_routine /home2/dingjie/jsfuzz/fuzz_target/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-regexp-prototype.c:602
#6 0x55fc2ff7dedc in ecma_builtin_dispatch_routine /home2/dingjie/jsfuzz/fuzz_target/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1460
#7 0x55fc2ff7dedc in ecma_builtin_dispatch_call /home2/dingjie/jsfuzz/fuzz_target/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1489
#8 0x55fc2ff7dedc in ecma_op_function_call_native_built_in /home2/dingjie/jsfuzz/fuzz_target/jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1217
#9 0x55fc2ff84908 in ecma_op_function_call /home2/dingjie/jsfuzz/fuzz_target/jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1411
#10 0x55fc2ffec6dc in ecma_op_function_validated_call /home2/dingjie/jsfuzz/fuzz_target/jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1371
#11 0x55fc2ffec6dc in ecma_builtin_string_prototype_object_replace_helper /home2/dingjie/jsfuzz/fuzz_target/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-string-prototype.c:555
#12 0x55fc2ffeda96 in ecma_builtin_string_prototype_dispatch_routine /home2/dingjie/jsfuzz/fuzz_target/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-string-prototype.c:1416
#13 0x55fc2ffeda96 in ecma_builtin_string_prototype_dispatch_routine /home2/dingjie/jsfuzz/fuzz_target/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-string-prototype.c:1369
#14 0x55fc2ff7dedc in ecma_builtin_dispatch_routine /home2/dingjie/jsfuzz/fuzz_target/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1460
#15 0x55fc2ff7dedc in ecma_builtin_dispatch_call /home2/dingjie/jsfuzz/fuzz_target/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1489
#16 0x55fc2ff7dedc in ecma_op_function_call_native_built_in /home2/dingjie/jsfuzz/fuzz_target/jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1217
#17 0x55fc2ff84908 in ecma_op_function_call /home2/dingjie/jsfuzz/fuzz_target/jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1411
#18 0x55fc2ffcf524 in ecma_op_function_validated_call /home2/dingjie/jsfuzz/fuzz_target/jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1371
#19 0x55fc2ffcf524 in opfunc_call /home2/dingjie/jsfuzz/fuzz_target/jerryscript/jerry-core/vm/vm.c:758
#20 0x55fc2ffcf524 in vm_execute /home2/dingjie/jsfuzz/fuzz_target/jerryscript/jerry-core/vm/vm.c:5217
#21 0x55fc2ffbca95 in vm_run /home2/dingjie/jsfuzz/fuzz_target/jerryscript/jerry-core/vm/vm.c:5312
#22 0x55fc2ff5f2a7 in vm_run_global /home2/dingjie/jsfuzz/fuzz_target/jerryscript/jerry-core/vm/vm.c:286
#23 0x55fc2ff5f2a7 in jerry_run /home2/dingjie/jsfuzz/fuzz_target/jerryscript/jerry-core/api/jerryscript.c:548
#24 0x55fc2ff51a41 in jerryx_source_exec_script /home2/dingjie/jsfuzz/fuzz_target/jerryscript/jerry-ext/util/sources.c:68
#25 0x55fc2ff51a41 in main /home2/dingjie/jsfuzz/fuzz_target/jerryscript/jerry-main/main-desktop.c:156
#26 0x7fc34e411082 in __libc_start_main ../csu/libc-start.c:308
#27 0x55fc2ff52abd in _start (/home2/dingjie/jsfuzz/fuzz_target/jerryscript/asan/bin/jerry+0x1eabd)
```
Credit: Jie Ding from HKU S3Lab | ==1327323==ERROR: AddressSanitizer: memcpy-param-overlap: memory ranges [0x55fb3005c209,0x55fc3005c205) and [0x55fc3005c0f8, 0x55fd3005c0f4) overlap | https://api.github.com/repos/jerryscript-project/jerryscript/issues/5080/comments | 0 | 2023-05-10T17:32:09Z | 2023-09-22T10:24:05Z | https://github.com/jerryscript-project/jerryscript/issues/5080 | 1,704,361,322 | 5,080 |
[
"jerryscript-project",
"jerryscript"
]
| ###### JerryScript revision
Commit: https://github.com/jerryscript-project/jerryscript/commit/05dbbd134c3b9e2482998f267857dd3722001cd7
Version: v3.0.0
###### Build platform
Ubuntu 20.04.5 LTS (Linux 5.4.0-144-generic x86_64)
###### Build steps
```sh
python ./tools/build.py --clean --debug --compile-flag=-m32 --compile-flag=-fno-omit-frame-pointer --compile-flag=-fno-common --compile-flag=-fsanitize=address --compile-flag=-g --strip=off --lto=off --error-messages=on --system-allocator=on --logging=on --line-info=on --stack-limit=20
```
###### Test case
<details><summary>testcase</summary>
<p>
```javascript
Array . isArray ( [ ] ) ;
Array . isArray ( { } ) , Array . isArray ( null ) , Array . isArray ( 0 ) , Array . isArray ( 0.1 ) , Array . isArray ( " " ) , Array . isArray ( void 0 ) , Array . isArray ( new Proxy ( [ ] , { } ) ) , Array . isArray ( new Proxy ( { } , { } ) ) , Array . isArray ( new Proxy ( new Proxy ( [ ] , { } ) , { } ) ) , Array . isArray ( new Proxy ( new Proxy ( { } , { } ) , { } ) ) ;
for ( var r = new Proxy ( [ ] , { } ) , y = 0 ; y < 131072 ; y ++ )
r = new Proxy ( r , function ( ) { } ) ;
Array . isArray ( r ) , RangeError ;
```
</p>
</details>
```javascript
// poc.js
for ( var r = new Proxy ( [ ] , { } ) , y = 0 ; y < 131072 ; y ++ )
r = new Proxy ( r , function ( ) { } ) ;
```
###### Execution steps & Output
```
$ ./jerryscript/build/bin/jerry poc.js
Error: JERRY_FATAL_REF_COUNT_LIMIT
Aborted
```
###### Backtrace
```
(gdb) bt
#0 0xf7fcfd99 in __kernel_vsyscall ()
#1 0xf7ca4276 in raise () from /lib32/libc.so.6
#2 0xf7c8c3f7 in abort () from /lib32/libc.so.6
#3 0x083ecca3 in jerry_port_fatal (code=JERRY_FATAL_REF_COUNT_LIMIT)
at ./jerryscript/jerry-port/common/jerry-port-process.c:29
#4 0x08260d02 in jerry_fatal (code=JERRY_FATAL_REF_COUNT_LIMIT) at ./jerryscript/jerry-core/jrt/jrt-fatals.c:63
#5 0x0818eb23 in ecma_bytecode_ref (bytecode_p=0xf5500910)
at ./jerryscript/jerry-core/ecma/base/ecma-helpers.c:1465
#6 0x081f8cd8 in ecma_op_create_function_object (scope_p=0xf57007b0, bytecode_data_p=0xf5500910, proto_id=ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE)
at ./jerryscript/jerry-core/ecma/operations/ecma-function-object.c:412
#7 0x081f8ec4 in ecma_op_create_any_function_object (scope_p=0xf57007b0, bytecode_data_p=0xf5500910)
at ./jerryscript/jerry-core/ecma/operations/ecma-function-object.c:587
#8 0x0830386c in vm_construct_literal_object (frame_ctx_p=<optimized out>, lit_value=0)
at ./jerryscript/jerry-core/vm/vm.c:470
#9 0x082f366c in vm_loop (frame_ctx_p=0xffffd000) at ./jerryscript/jerry-core/vm/vm.c:1177
#10 0x082d6b83 in vm_execute (frame_ctx_p=0xffffd000) at ./jerryscript/jerry-core/vm/vm.c:5211
#11 0x082d4f62 in vm_run (shared_p=0xffffd110, this_binding_value=4119870595, lex_env_p=0xf57007b0)
at ./jerryscript/jerry-core/vm/vm.c:5312
#12 0x082d4c39 in vm_run_global (bytecode_p=<optimized out>, function_object_p=<optimized out>)
at ./jerryscript/jerry-core/vm/vm.c:286
#13 0x0812a4e5 in jerry_run (script=4115663027) at ./jerryscript/jerry-core/api/jerryscript.c:548
#14 0x083eac3f in jerryx_source_exec_script (path_p=0xffffd5d5 "poc.js")
at ./jerryscript/jerry-ext/util/sources.c:68
#15 0x0812162d in main (argc=<optimized out>, argv=<optimized out>) at ./jerryscript/jerry-main/main-desktop.c:156
```
Credits: @Ye0nny, @EJueon of the seclab-yonsei.
| Error: JERRY_FATAL_REF_COUNT_LIMIT at jerryscript/jerry-core/ecma/base/ecma-helpers.c:1465 (ecma_bytecode_ref) | https://api.github.com/repos/jerryscript-project/jerryscript/issues/5079/comments | 0 | 2023-04-29T06:40:27Z | 2023-04-29T06:40:27Z | https://github.com/jerryscript-project/jerryscript/issues/5079 | 1,689,419,943 | 5,079 |
[
"jerryscript-project",
"jerryscript"
]
| ###### JerryScript revision
Commit: https://github.com/jerryscript-project/jerryscript/commit/05dbbd134c3b9e2482998f267857dd3722001cd7
Version: v3.0.0
###### Build platform
Ubuntu 20.04.5 LTS (Linux 5.4.0-144-generic x86_64)
###### Build steps
```sh
python ./tools/build.py --clean --compile-flag=-m32 --compile-flag=-fno-omit-frame-pointer --compile-flag=-fno-common --compile-flag=-fsanitize=address --compile-flag=-g --strip=off --lto=off --error-messages=on --system-allocator=on --logging=on --line-info=on --stack-limit=20
```
###### Test case
```javascript
// poc.js
class s { static { ( ) => { class s { static { } ; } } ; } }
```
###### Execution steps & Output
```
$ ./jerryscript/build/bin/jerry poc.js
=================================================================
==2012485==ERROR: AddressSanitizer: attempting free on address which was not malloc()-ed: 0xff975ce0 in thread T0
#0 0xf79dd414 in __interceptor_free ../../../../../src/libsanitizer/asan/asan_malloc_linux.cc:122
#1 0x56648b87 in jmem_heap_free_block_internal ./jerryscript/jerry-core/jmem/jmem-heap.c:477
#2 0x566bca69 in scanner_release_next ./jerryscript/jerry-core/parser/js/js-scanner-util.c:262
#3 0x5672aac8 in parser_parse_class_body ./jerryscript/jerry-core/parser/js/js-parser-expr.c:825
#4 0x5672aac8 in parser_parse_class ./jerryscript/jerry-core/parser/js/js-parser-expr.c:1110
#5 0x56734f84 in parser_parse_statements ./jerryscript/jerry-core/parser/js/js-parser-statm.c:2787
#6 0x566bab25 in parser_parse_source ./jerryscript/jerry-core/parser/js/js-parser.c:2280
#7 0x5664d3cf in jerry_parse_common ./jerryscript/jerry-core/api/jerryscript.c:412
#8 0x5664d631 in jerry_parse ./jerryscript/jerry-core/api/jerryscript.c:480
#9 0x56742644 in jerryx_source_parse_script ./jerryscript/jerry-ext/util/sources.c:52
#10 0x56742701 in jerryx_source_exec_script ./jerryscript/jerry-ext/util/sources.c:63
#11 0x56645d04 in main ./jerryscript/jerry-main/main-desktop.c:156
#12 0xf75f4ed4 in __libc_start_main (/lib32/libc.so.6+0x1aed4)
#13 0x56648fb4 in _start (./jerryscript/build/bin/jerry+0x12fb4)
Address 0xff975ce0 is located in stack of thread T0 at offset 1584 in frame
#0 0x5673438c in parser_parse_statements ./jerryscript/jerry-core/parser/js/js-parser-statm.c:2601
This frame has 44 object(s):
[32, 36) 'do_while_statement' (line 2827)
[48, 52) 'loop' (line 2828)
[64, 68) 'loop' (line 3106)
[80, 84) 'loop' (line 3232)
[96, 100) 'loop' (line 954)
[112, 116) 'loop' (line 1110)
[128, 132) 'loop' (line 2128)
[144, 148) 'loop' (line 2180)
[160, 164) 'loop' (line 2226)
[176, 180) 'loop' (line 895)
[192, 196) 'do_while_statement' (line 930)
[208, 216) 'else_statement' (line 3195)
[240, 248) 'if_statement' (line 776)
[272, 280) 'branch' (line 1316)
[304, 312) 'with_statement' (line 834)
[336, 344) 'iterator' (line 1990)
[368, 376) 'iterator' (line 2017)
[400, 408) 'iterator' (line 2065)
[432, 440) 'iterator' (line 2147)
[464, 472) 'loop_iterator' (line 2156)
[496, 504) 'iterator' (line 2549)
[528, 536) 'iterator' (line 1809)
[560, 568) 'if_statement' (line 796)
[592, 600) 'else_statement' (line 797)
[624, 632) 'iterator' (line 798)
[656, 664) 'iterator' (line 904)
[688, 696) 'with_statement' (line 864)
[720, 732) 'lit_location' (line 2618)
[752, 764) 'switch_statement' (line 3107)
[784, 796) 'for_in_of_statement' (line 3231)
[816, 828) 'location' (line 2385)
[848, 860) 'for_in_of_statement' (line 1139)
[880, 892) 'start_location' (line 1140)
[912, 924) 'end_location' (line 1140)
[944, 956) 'switch_statement' (line 1991)
[976, 988) 'switch_statement' (line 2018)
[1008, 1024) 'try_statement' (line 2863)
[1040, 1056) 'label' (line 3174)
[1072, 1088) 'label_statement' (line 2090)
[1104, 1120) 'label_statement' (line 2173)
[1136, 1152) 'label_statement' (line 2550)
[1168, 1184) 'try_statement' (line 1808)
[1200, 1224) 'while_statement' (line 953)
[1264, 1300) 'for_statement' (line 1506) <== Memory access at offset 1584 overflows this variable
HINT: this may be a false positive if your program uses some custom stack unwind mechanism, swapcontext or vfork
(longjmp and C++ exceptions *are* supported)
SUMMARY: AddressSanitizer: bad-free ../../../../../src/libsanitizer/asan/asan_malloc_linux.cc:122 in __interceptor_free
==2012485==ABORTING
```
---
with debugging mode(--debug)
###### Outputs
```
ICE: Assertion 'context_p->next_scanner_info_p->type == SCANNER_TYPE_CLASS_STATIC_BLOCK_END' failed at ./jerryscript/jerry-core/parser/js/js-parser-expr.c(parser_parse_class_body):822.
Error: JERRY_FATAL_FAILED_ASSERTION
Aborted
```
Credits: @Ye0nny, @EJueon of the seclab-yonsei.
| AddressSanitizer: attempting free on address which was not malloc()-ed | https://api.github.com/repos/jerryscript-project/jerryscript/issues/5078/comments | 0 | 2023-04-29T05:48:44Z | 2023-04-29T05:48:44Z | https://github.com/jerryscript-project/jerryscript/issues/5078 | 1,689,405,354 | 5,078 |
[
"jerryscript-project",
"jerryscript"
]
| ### Description
Other js engines can print correctly while jerry throws a type error.
### JerryScript revision
2.4.0
### Build platform
ubuntu20.04
### Test case
```
result = String.prototype.normalize.call(String.prototype.padStart.call(0, 5, '-'));
print(result);
```
### Output
Unhandled exception: TypeError
### Expected behavior
----0
| Inconsistent behavior | https://api.github.com/repos/jerryscript-project/jerryscript/issues/5077/comments | 2 | 2023-04-27T12:58:23Z | 2023-07-18T04:07:54Z | https://github.com/jerryscript-project/jerryscript/issues/5077 | 1,686,802,337 | 5,077 |
[
"jerryscript-project",
"jerryscript"
]
| ###### JerryScript revision
Commit: 05dbbd13[](05dbbd134c3b9e2482998f267857dd3722001cd7)
Version: v3.0.0
###### Build platform
Ubuntu 20.04.5 LTS (Linux 5.4.0-144-generic x86_64)
###### Build steps
```sh
python ./tools/build.py --clean --compile-flag=-m32 --compile-flag=-fno-omit-frame-pointer --compile-flag=-fno-common --compile-flag=-fsanitize=address --compile-flag=-g --strip=off --lto=off --error-messages=on --system-allocator=on --logging=on --line-info=on --stack-limit=20
```
###### Test case
<details><summary>testcase</summary>
<p>
```JavaScript
class s extends WeakMap { static { newObj } ; } function func0 ( [ " " ] = 2 , { static { 536870912 } has ( ) ; assert ( a instanceof s ) ) .
```
</p>
</details>
``` JavaScript
// poc.js
class s extends WeakMap { static { } ; }
function func0 ( static { 536870912 } )
```
###### Execution steps & Output
```sh
$ ./jerryscript/build/bin/jerry poc.js
=================================================================
==2433547==ERROR: AddressSanitizer: heap-buffer-overflow on address 0xf50006ac at pc 0x566ef7ff bp 0xffa35298 sp 0xffa35288
READ of size 2 at 0xf50006ac thread T0
#0 0x566ef7fe in parser_parse_function_statement /jerryscript/jerry-core/parser/js/js-parser-statm.c:696
#1 0x566f3001 in parser_parse_statements /jerryscript/jerry-core/parser/js/js-parser-statm.c:2809
#2 0x56677b25 in parser_parse_source /jerryscript/jerry-core/parser/js/js-parser.c:2280
#3 0x5660a3cf in jerry_parse_common /jerryscript/jerry-core/api/jerryscript.c:412
#4 0x5660a631 in jerry_parse /jerryscript/jerry-core/api/jerryscript.c:480
#5 0x566ff644 in jerryx_source_parse_script /jerryscript/jerry-ext/util/sources.c:52
#6 0x566ff701 in jerryx_source_exec_script /jerryscript/jerry-ext/util/sources.c:63
#7 0x56602d04 in main /jerryscript/jerry-main/main-desktop.c:156
#8 0xf75faed4 in __libc_start_main (/lib32/libc.so.6+0x1aed4)
#9 0x56605fb4 in _start (/jerryscript/build/bin/jerry+0x12fb4)
0xf50006ac is located 4 bytes to the left of 8-byte region [0xf50006b0,0xf50006b8)
allocated by thread T0 here:
#0 0xf79e3817 in __interceptor_malloc ../../../../../src/libsanitizer/asan/asan_malloc_linux.cc:144
#1 0x56605ae4 in jmem_heap_alloc /jerryscript/jerry-core/jmem/jmem-heap.c:254
#2 0x5666ad8d in jmem_heap_gc_and_alloc_block /jerryscript/jerry-core/jmem/jmem-heap.c:291
#3 0x566eb5ab in parser_malloc /jerryscript/jerry-core/parser/js/js-parser-mem.c:43
#4 0x5667fc95 in scanner_create_variables /jerryscript/jerry-core/parser/js/js-scanner-util.c:2341
#5 0x56677ae1 in parser_parse_source /jerryscript/jerry-core/parser/js/js-parser.c:2277
#6 0x5660a3cf in jerry_parse_common /jerryscript/jerry-core/api/jerryscript.c:412
#7 0x5660a631 in jerry_parse /jerryscript/jerry-core/api/jerryscript.c:480
#8 0x566ff644 in jerryx_source_parse_script /jerryscript/jerry-ext/util/sources.c:52
#9 0x566ff701 in jerryx_source_exec_script /jerryscript/jerry-ext/util/sources.c:63
#10 0x56602d04 in main /jerryscript/jerry-main/main-desktop.c:156
#11 0xf75faed4 in __libc_start_main (/lib32/libc.so.6+0x1aed4)
SUMMARY: AddressSanitizer: heap-buffer-overflow /home/aifuzz/targets/jerryscript_afl_asan2/jerry-core/parser/js/js-parser-statm.c:696 in parser_parse_function_statement
Shadow bytes around the buggy address:
0x3ea00080: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x3ea00090: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x3ea000a0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x3ea000b0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x3ea000c0: fa fa 05 fa fa fa 00 00 fa fa 00 07 fa fa 05 fa
=>0x3ea000d0: fa fa fd fd fa[fa]00 fa fa fa 00 04 fa fa fd fd
0x3ea000e0: fa fa fd fd fa fa fd fd fa fa 00 06 fa fa 00 03
0x3ea000f0: fa fa 00 07 fa fa 00 00 fa fa fa fa fa fa fa fa
0x3ea00100: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x3ea00110: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x3ea00120: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Container overflow: fc
Array cookie: ac
Intra object redzone: bb
ASan internal: fe
Left alloca redzone: ca
Right alloca redzone: cb
Shadow gap: cc
==2433547==ABORTING
```
---
with debugging mode(--debug)
###### Outputs
```
ICE: Assertion 'context_p->scope_stack_top >= 2' failed at /jerryscript/jerry-core/parser/js/js-parser-statm.c(parser_parse_function_statement):691.
Error: JERRY_FATAL_FAILED_ASSERTION
```
If I had to guess, This seems to be happening due to similar reasons as #5056.
credits: @EJueon, @Ye0nny of the seclab-yonsei.
| heap-buffer-overflow in parser_parse_function_statement | https://api.github.com/repos/jerryscript-project/jerryscript/issues/5076/comments | 0 | 2023-04-23T16:01:47Z | 2023-04-23T16:01:47Z | https://github.com/jerryscript-project/jerryscript/issues/5076 | 1,680,076,342 | 5,076 |
[
"jerryscript-project",
"jerryscript"
]
|
### JerryScript revision
2.4.0
### Description
'a' is before 'A', so the first result should be negative number.
When adding parameter```{ sensitivity: 'base' }```, 'a' should be equal 'A', so the second result should be 0.
### Test case
```
var a = 'a';
var b = 'A';
print(a.localeCompare(b));
print(a.localeCompare(b, 'en', { sensitivity: 'base' }));
```
### Output
1
1
### Expected behavior
-1(Or other negative number)
0
| Inconsistent behavior in localeCompare | https://api.github.com/repos/jerryscript-project/jerryscript/issues/5075/comments | 2 | 2023-04-21T13:10:15Z | 2023-07-18T04:07:22Z | https://github.com/jerryscript-project/jerryscript/issues/5075 | 1,678,501,033 | 5,075 |
[
"jerryscript-project",
"jerryscript"
]
| ###### JerryScript revision
Commit: https://github.com/jerryscript-project/jerryscript/commit/05dbbd134c3b9e2482998f267857dd3722001cd7
Version: v3.0.0
###### Build platform
Ubuntu 20.04.5 LTS (Linux 5.4.0-144-generic x86_64)
###### Build steps
```sh
python ./tools/build.py --clean --debug --compile-flag=-m32 --compile-flag=-fno-omit-frame-pointer --compile-flag=-fno-common --compile-flag=-fsanitize=address --compile-flag=-g --strip=off --lto=off --error-messages=on --system-allocator=on --logging=on --line-info=on --stack-limit=20
```
###### Test case
<details><summary>testcase</summary>
<p>
```javascript
JSON . parse ( " [ 1 , 2 , 2 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 8 , 8 , 0 , 1 , 2 , 2 , 4 , 4 , 4 , 4 , 8 , 8 , 0 ] " , function ( func0 , t ) { return " [ " . repeat ( 32768 ) + JSON . parse ( t ) ; } ) ; str = " [ 32 " + str + " 2 > ] " ; str += " 32 : 32 === ] " ; for ( i = 0 ; i < 2048 ; i ++ ) JSON . parse . call ( str , i ) ; str += " 1 , " ; str += " 1 ] " ; JSON . parse ( str ) ;
```
</p>
</details>
```javascript
// poc.js
JSON . parse ( " [ 1 , 2 , 2 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 8 , 8 , 0 , 1 , 2 , 2 , 4 , 4 , 4 , 4 , 8 , 8 , 0 ] " , function ( func0 , t ) { return " [ " . repeat ( 32768 ) + JSON . parse ( t ) ; } ) ;
```
###### Execution steps & Output
```
$ ./jerryscript/build/bin/jerry poc.js
AddressSanitizer:DEADLYSIGNAL
=================================================================
==1402144==ERROR: AddressSanitizer: stack-overflow on address 0xff64bfec (pc 0x081100a7 bp 0x00000000 sp 0xff64bff0 T0)
#0 0x81100a7 in __sanitizer::StackDepotBase<__sanitizer::StackDepotNode, 1, 20>::Put(__sanitizer::StackTrace, bool*) (./jerryscript/build/bin/jerry+0x81100a7)
#1 0x811007e in __sanitizer::StackDepotPut(__sanitizer::StackTrace) (./jerryscript/build/bin/jerry+0x811007e)
#2 0x807a2d1 in __asan::Allocator::Allocate(unsigned long, unsigned long, __sanitizer::BufferedStackTrace*, __asan::AllocType, bool) (./jerryscript/build/bin/jerry+0x807a2d1)
#3 0x8079ceb in __asan::asan_malloc(unsigned long, __sanitizer::BufferedStackTrace*) (./jerryscript/build/bin/jerry+0x8079ceb)
#4 0x80efec3 in malloc (./jerryscript/build/bin/jerry+0x80efec3)
#5 0x825f11c in jmem_heap_alloc ./jerryscript/jerry-core/jmem/jmem-heap.c:254:10
#6 0x825f11c in jmem_heap_gc_and_alloc_block ./jerryscript/jerry-core/jmem/jmem-heap.c:291:24
#7 0x8185a9d in ecma_create_object ./jerryscript/jerry-core/ecma/base/ecma-helpers.c:94:38
#8 0x81cb9ab in ecma_op_alloc_array_object ./jerryscript/jerry-core/ecma/operations/ecma-array-object.c:58:5
#9 0x81cb9ab in ecma_op_new_array_object ./jerryscript/jerry-core/ecma/operations/ecma-array-object.c:110:29
#10 0x81a8a86 in ecma_builtin_json_parse_value ./jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-json.c:562:32
#11 0x81a8fd8 in ecma_builtin_json_parse_value ./jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-json.c:573:30
#12 0x81a8fd8 in ecma_builtin_json_parse_value ./jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-json.c:573:30
...
...
#243 0x81a8fd8 in ecma_builtin_json_parse_value ./jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-json.c:573:30
#244 0x81a8fd8 in ecma_builtin_json_parse_value ./jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-json.c:573:30
#245 0x81a8fd8 in ecma_builtin_json_parse_value ./jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-json.c:573:30
#246 0x81a8fd8 in ecma_builtin_json_parse_value ./jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-json.c:573:30
SUMMARY: AddressSanitizer: stack-overflow (./jerryscript/build/bin/jerry+0x81100a7) in __sanitizer::StackDepotBase<__sanitizer::StackDepotNode, 1, 20>::Put(__sanitizer::StackTrace, bool*)
==1402144==ABORTING
```
Credits: @Ye0nny, @EJueon of the seclab-yonsei.
| AddressSanitizer: stack-overflow | https://api.github.com/repos/jerryscript-project/jerryscript/issues/5074/comments | 0 | 2023-04-20T11:55:42Z | 2023-04-20T11:55:42Z | https://github.com/jerryscript-project/jerryscript/issues/5074 | 1,676,574,412 | 5,074 |
[
"jerryscript-project",
"jerryscript"
]
| ###### JerryScript revision
Commit: https://github.com/jerryscript-project/jerryscript/commit/05dbbd134c3b9e2482998f267857dd3722001cd7
Version: v3.0.0
###### Build platform
Ubuntu 20.04.5 LTS (Linux 5.4.0-144-generic x86_64)
###### Build steps
```sh
python ./tools/build.py --clean --compile-flag=-m32 --compile-flag=-fno-omit-frame-pointer --compile-flag=-fno-common --compile-flag=-fsanitize=address --compile-flag=-g --strip=off --lto=off --error-messages=on --system-allocator=on --logging=on --line-info=on --stack-limit=20
```
###### Test case
<details><summary>testcase</summary>
<p>
```javascript
class s extends Uint32Array { static [ null ] ; [ null ] ; static [ null ] ; static set ( ) { } static { } ; } const n = new s ( t ) ; const t = BigInt ( ) ; assert ( n === Uint32Array ) ;
```
</p>
</details>
```javascript
// poc.js
class s extends Uint32Array { static { } ; } const n = new s ( ) ; const t = BigInt ( ) ;
```
###### Execution steps & Output
```
$ ./jerryscript/build/bin/jerry poc.js
=================================================================
==3080358==ERROR: AddressSanitizer: heap-buffer-overflow on address 0xf510068c at pc 0x566887dc bp 0xfff81e68 sp 0xfff81e58
READ of size 2 at 0xf510068c thread T0
#0 0x566887db in scanner_literal_is_created ./jerryscript/jerry-core/parser/js/js-scanner-util.c:2922
#1 0x566f8265 in parser_parse_var_statement ./jerryscript/jerry-core/parser/js/js-parser-statm.c:523
#2 0x566fda21 in parser_parse_statements ./jerryscript/jerry-core/parser/js/js-parser-statm.c:3021
#3 0x5667eb25 in parser_parse_source ./jerryscript/jerry-core/parser/js/js-parser.c:2280
#4 0x566113cf in jerry_parse_common ./jerryscript/jerry-core/api/jerryscript.c:412
#5 0x56611631 in jerry_parse ./jerryscript/jerry-core/api/jerryscript.c:480
#6 0x56706644 in jerryx_source_parse_script ./jerryscript/jerry-ext/util/sources.c:52
#7 0x56706701 in jerryx_source_exec_script ./jerryscript/jerry-ext/util/sources.c:63
#8 0x56609d04 in main ./jerryscript/jerry-main/main-desktop.c:156
#9 0xf7627ed4 in __libc_start_main (/lib32/libc.so.6+0x1aed4)
#10 0x5660cfb4 in _start (./jerryscript/build/bin/jerry+0x12fb4)
0xf510068c is located 4 bytes to the left of 8-byte region [0xf5100690,0xf5100698)
allocated by thread T0 here:
#0 0xf7a10817 in __interceptor_malloc ../../../../../src/libsanitizer/asan/asan_malloc_linux.cc:144
#1 0x5660cae4 in jmem_heap_alloc ./jerryscript/jerry-core/jmem/jmem-heap.c:254
#2 0x56671d8d in jmem_heap_gc_and_alloc_block ./jerryscript/jerry-core/jmem/jmem-heap.c:291
#3 0x566f25ab in parser_malloc ./jerryscript/jerry-core/parser/js/js-parser-mem.c:43
#4 0x56686c95 in scanner_create_variables ./jerryscript/jerry-core/parser/js/js-scanner-util.c:2341
#5 0x5667eae1 in parser_parse_source ./jerryscript/jerry-core/parser/js/js-parser.c:2277
#6 0x566113cf in jerry_parse_common ./jerryscript/jerry-core/api/jerryscript.c:412
#7 0x56611631 in jerry_parse ./jerryscript/jerry-core/api/jerryscript.c:480
#8 0x56706644 in jerryx_source_parse_script ./jerryscript/jerry-ext/util/sources.c:52
#9 0x56706701 in jerryx_source_exec_script ./jerryscript/jerry-ext/util/sources.c:63
#10 0x56609d04 in main ./jerryscript/jerry-main/main-desktop.c:156
#11 0xf7627ed4 in __libc_start_main (/lib32/libc.so.6+0x1aed4)
SUMMARY: AddressSanitizer: heap-buffer-overflow ./jerryscript/jerry-core/parser/js/js-scanner-util.c:2922 in scanner_literal_is_created
Shadow bytes around the buggy address:
0x3ea20080: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x3ea20090: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x3ea200a0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x3ea200b0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x3ea200c0: fa fa fa fa fa fa 05 fa fa fa 05 fa fa fa fd fd
=>0x3ea200d0: fa[fa]00 fa fa fa 00 04 fa fa fd fd fa fa fd fd
0x3ea200e0: fa fa fd fd fa fa 00 07 fa fa 00 06 fa fa 00 03
0x3ea200f0: fa fa 00 07 fa fa 00 00 fa fa fa fa fa fa fa fa
0x3ea20100: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x3ea20110: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x3ea20120: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Container overflow: fc
Array cookie: ac
Intra object redzone: bb
ASan internal: fe
Left alloca redzone: ca
Right alloca redzone: cb
Shadow gap: cc
==3080358==ABORTING
```
---
with debugging mode(--debug)
###### Outputs
```
ICE: Assertion 'scope_stack_p > context_p->scope_stack_p' failed at ./jerryscript/jerry-core/parser/js/js-scanner-util.c(scanner_literal_is_created):2920.
Error: JERRY_FATAL_FAILED_ASSERTION
Aborted
```
Credits: @Ye0nny, @EJueon of the seclab-yonsei.
| heap-buffer-overflow in scanner_literal_is_created | https://api.github.com/repos/jerryscript-project/jerryscript/issues/5073/comments | 0 | 2023-04-19T12:27:29Z | 2023-04-19T12:27:29Z | https://github.com/jerryscript-project/jerryscript/issues/5073 | 1,674,802,543 | 5,073 |
[
"jerryscript-project",
"jerryscript"
]
| ###### JerryScript revision
Commit: https://github.com/jerryscript-project/jerryscript/commit/05dbbd134c3b9e2482998f267857dd3722001cd7
Version: v3.0.0
###### Build platform
Ubuntu 20.04.5 LTS (Linux 5.4.0-144-generic x86_64)
###### Build steps
```sh
python ./tools/build.py --clean --debug --compile-flag=-m32 --compile-flag=-fno-omit-frame-pointer --compile-flag=-fno-common --compile-flag=-fsanitize=address --compile-flag=-g --strip=off --lto=off --error-messages=on --system-allocator=on --logging=on --line-info=on --stack-limit=20
```
###### Test case
<details><summary>testcase</summary>
<p>
```javascript
function func0 ( n , r , t , u ) { if ( n < 0 ) { throw arguments ; } return n + r + t + u ; } function func1 ( n , r , t , u , f ) { return i ( n , r , t , u * f ) ; } function func2 ( n , r ) { return t ( n , ... r ) ; } var e = new Float32Array ( 1 * 1000000.0 * 1000.0 ) . reverse ( ) . filter ( r => r === - r . valueOf ) [ 0 ] ; function func3 ( ) { ; } function func4 ( n ) { return r ( n , n ) ; }
```
</p>
</details>
```javascript
// poc.js
var e = new Float32Array ( 1000000.0 * 1000.0 ) . reverse ( );
```
###### Execution steps & Output
```
$ ./jerryscript/build/bin/jerry poc.js
=================================================================
==2464945==ERROR: AddressSanitizer: requested allocation size 0xee6b2800 (0xee6b3800 after adjustments for alignment, red zones etc.) exceeds maximum supported size of 0xc0000000 (thread T0)
#0 0x80efe65 in malloc (./jerryscript/build/bin/jerry+0x80efe65)
#1 0x825f11c in jmem_heap_alloc ./jerryscript/jerry-core/jmem/jmem-heap.c:254:10
#2 0x825f11c in jmem_heap_gc_and_alloc_block ./jerryscript/jerry-core/jmem/jmem-heap.c:291:24
#3 0x81d5463 in ecma_arraybuffer_allocate_buffer ./jerryscript/jerry-core/ecma/operations/ecma-arraybuffer-object.c:169:28
#4 0x81c47d1 in ecma_builtin_typedarray_prototype_dispatch_routine ./jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-typedarray-prototype.c:1929:12
#5 0x81b94a4 in ecma_builtin_dispatch_routine ./jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1460:10
#6 0x81b94a4 in ecma_builtin_dispatch_call ./jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1489:12
#7 0x81fb6b7 in ecma_op_function_call_native_built_in ./jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1217:5
#8 0x81fa81c in ecma_op_function_call ./jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1411:16
#9 0x81fa5ce in ecma_op_function_validated_call ./jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1371:10
#10 0x82d7630 in opfunc_call ./jerryscript/jerry-core/vm/vm.c:758:5
#11 0x82d7630 in vm_execute ./jerryscript/jerry-core/vm/vm.c:5217:9
#12 0x82d4f61 in vm_run ./jerryscript/jerry-core/vm/vm.c:5312:10
#13 0x82d4c38 in vm_run_global ./jerryscript/jerry-core/vm/vm.c:286:25
#14 0x812a4e4 in jerry_run ./jerryscript/jerry-core/api/jerryscript.c:548:24
#15 0x83eac3e in jerryx_source_exec_script ./jerryscript/jerry-ext/util/sources.c:68:14
#16 0x812162c in main ./jerryscript/jerry-main/main-desktop.c:156:20
#17 0xf7b9aed4 in __libc_start_main (/lib32/libc.so.6+0x1aed4)
==2464945==HINT: if you don't care about these errors you may set allocator_may_return_null=1
SUMMARY: AddressSanitizer: allocation-size-too-big (./jerryscript/build/bin/jerry+0x80efe65) in malloc
==2464945==ABORTING
```
Credits:
@Ye0nny, @EJueon of the seclab-yonsei.
| AddressSanitizer: requested allocation size exceeds maximum supported size | https://api.github.com/repos/jerryscript-project/jerryscript/issues/5072/comments | 2 | 2023-04-19T11:58:01Z | 2023-07-18T04:08:33Z | https://github.com/jerryscript-project/jerryscript/issues/5072 | 1,674,755,105 | 5,072 |
[
"jerryscript-project",
"jerryscript"
]
| ###### JerryScript revision
Commit: https://github.com/jerryscript-project/jerryscript/commit/05dbbd134c3b9e2482998f267857dd3722001cd7
Version: v3.0.0
###### Build platform
Ubuntu 20.04.5 LTS (Linux 5.4.0-144-generic x86_64)
###### Build steps
```sh
python ./tools/build.py --clean --debug --compile-flag=-m32 --compile-flag=-fno-omit-frame-pointer --compile-flag=-fno-common --compile-flag=-fsanitize=address --compile-flag=-g --strip=off --lto=off --error-messages=on --system-allocator=on --logging=on --line-info=on --stack-limit=20
```
###### Test case
<details><summary>testcase</summary>
<p>
```javascript
var r = new Int32Array ( 8 ) . sort ( ) ; r = new SharedArrayBuffer ( 2147483648 ) . slice ( 8 ) ; r = new Int32Array ( 128 ) . subarray ( 64 ) . sort ( d ) ; a = new Int32Array . set ( r ) ; var a ; r = r . toString ( r ) ; r . constructor = a ; set ( r ) ; assert ( a === r . toString ( 32 ) ) ;
```
</p>
</details>
```javascript
// poc1.js
var r = new SharedArrayBuffer ( 2147483648 ) . slice () ;
```
###### Execution steps & Output
```
$ ./jerryscript/build/bin/jerry poc1.js
=================================================================
==2169015==ERROR: AddressSanitizer: allocator is out of memory trying to allocate 0x80000000 bytes
#0 0x80efe65 in malloc (./jerryscript/build/bin/jerry+0x80efe65)
#1 0x825f11c in jmem_heap_alloc ./jerryscript/jerry-core/jmem/jmem-heap.c:254:10
#2 0x825f11c in jmem_heap_gc_and_alloc_block ./jerryscript/jerry-core/jmem/jmem-heap.c:291:24
#3 0x81d5463 in ecma_arraybuffer_allocate_buffer ./jerryscript/jerry-core/ecma/operations/ecma-arraybuffer-object.c:169:28
#4 0x81d7ae3 in ecma_arraybuffer_allocate_buffer_throw ./jerryscript/jerry-core/ecma/operations/ecma-arraybuffer-object.c:195:10
#5 0x81d7ae3 in ecma_builtin_arraybuffer_slice ./jerryscript/jerry-core/ecma/operations/ecma-arraybuffer-object.c:500:7
#6 0x8362abc in ecma_builtin_shared_arraybuffer_prototype_object_slice ./jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-shared-arraybuffer-prototype.c:104:10
#7 0x8362abc in ecma_builtin_shared_arraybuffer_prototype_dispatch_routine ./jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-shared-arraybuffer-prototype.inc.h:39:1
#8 0x81b94a4 in ecma_builtin_dispatch_routine ./jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1460:10
#9 0x81b94a4 in ecma_builtin_dispatch_call ./jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1489:12
#10 0x81fb6b7 in ecma_op_function_call_native_built_in ./jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1217:5
#11 0x81fa81c in ecma_op_function_call ./jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1411:16
#12 0x81fa5ce in ecma_op_function_validated_call ./jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1371:10
#13 0x82d7630 in opfunc_call ./jerryscript/jerry-core/vm/vm.c:758:5
#14 0x82d7630 in vm_execute ./jerryscript/jerry-core/vm/vm.c:5217:9
#15 0x82d4f61 in vm_run ./jerryscript/jerry-core/vm/vm.c:5312:10
#16 0x82d4c38 in vm_run_global ./jerryscript/jerry-core/vm/vm.c:286:25
#17 0x812a4e4 in jerry_run ./jerryscript/jerry-core/api/jerryscript.c:548:24
#18 0x83eac3e in jerryx_source_exec_script ./jerryscript/jerry-ext/util/sources.c:68:14
#19 0x812162c in main ./jerryscript/jerry-main/main-desktop.c:156:20
#20 0xf7be5ed4 in __libc_start_main (/lib32/libc.so.6+0x1aed4)
==2169015==HINT: if you don't care about these errors you may set allocator_may_return_null=1
SUMMARY: AddressSanitizer: out-of-memory (./jerryscript/build/bin/jerry+0x80efe65) in malloc
==2169015==ABORTING
```
---
###### Test case+
<details><summary>testcase</summary>
<p>
```javascript
var a = " 32 " ; var e = 4 ; var a = new ArrayBuffer ( 2147483648 , t ) ; Infinity ; var a = new Uint32Array ( a , e ) ; a === e ; new Int32Array ( a , e ) ; a <= e ; a = new Uint8Array ( a ) ; a = new Uint8ClampedArray ( a , e , a ) !== e ; a < e ; a >= e ; a <= e ; 0 == e !== null ; a != e ; a !== e ; false == 0 ; false == undefined === 0 ; var t = a . t ; " " === false ; " " == 0 ; " " === 0 ; false == undefined ; 0 == null ;
```
</p>
</details>
```javascript
// poc2.js
var e = 4 ; var a = new ArrayBuffer ( 2147483648 ) ; var a = new Uint32Array ( a , e ) ; new Int32Array ( a , e ) ;
```
###### Execution steps & Output+
```
$ ./jerryscript/build/bin/jerry poc2.js
=================================================================
==2170063==ERROR: AddressSanitizer: allocator is out of memory trying to allocate 0x7ffffffc bytes
#0 0x80efe65 in malloc (./jerryscript/build/bin/jerry+0x80efe65)
#1 0x825f11c in jmem_heap_alloc ./jerryscript/jerry-core/jmem/jmem-heap.c:254:10
#2 0x825f11c in jmem_heap_gc_and_alloc_block ./jerryscript/jerry-core/jmem/jmem-heap.c:291:24
#3 0x81d5463 in ecma_arraybuffer_allocate_buffer ./jerryscript/jerry-core/ecma/operations/ecma-arraybuffer-object.c:169:28
#4 0x82583e0 in ecma_typedarray_create_object_with_typedarray ./jerryscript/jerry-core/ecma/operations/ecma-typedarray-object.c:913:7
#5 0x82583e0 in ecma_op_create_typedarray ./jerryscript/jerry-core/ecma/operations/ecma-typedarray-object.c:1679:12
#6 0x81bad21 in ecma_typedarray_helper_dispatch_construct ./jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-typedarray-helpers.c:60:22
#7 0x81ba8f4 in ecma_builtin_int32array_dispatch_construct ./jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-int32array.c:68:10
#8 0x81b99ce in ecma_builtin_dispatch_construct ./jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1518:10
#9 0x81fc476 in ecma_op_function_construct_built_in ./jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1537:28
#10 0x81fc476 in ecma_op_function_construct ./jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1717:14
#11 0x82d7255 in opfunc_construct ./jerryscript/jerry-core/vm/vm.c:840:7
#12 0x82d7255 in vm_execute ./jerryscript/jerry-core/vm/vm.c:5236:9
#13 0x82d4f61 in vm_run ./jerryscript/jerry-core/vm/vm.c:5312:10
#14 0x82d4c38 in vm_run_global ./jerryscript/jerry-core/vm/vm.c:286:25
#15 0x812a4e4 in jerry_run ./jerryscript/jerry-core/api/jerryscript.c:548:24
#16 0x83eac3e in jerryx_source_exec_script ./jerryscript/jerry-ext/util/sources.c:68:14
#17 0x812162c in main ./jerryscript/jerry-main/main-desktop.c:156:20
#18 0xf7c77ed4 in __libc_start_main (/lib32/libc.so.6+0x1aed4)
==2170063==HINT: if you don't care about these errors you may set allocator_may_return_null=1
SUMMARY: AddressSanitizer: out-of-memory (./jerryscript/build/bin/jerry+0x80efe65) in malloc
==2170063==ABORTING
```
Credits:
@Ye0nny, @EJueon of the seclab-yonsei.
| AddressSanitizer: allocator is out of memory trying to allocate | https://api.github.com/repos/jerryscript-project/jerryscript/issues/5071/comments | 0 | 2023-04-19T11:36:46Z | 2023-04-19T11:36:46Z | https://github.com/jerryscript-project/jerryscript/issues/5071 | 1,674,723,917 | 5,071 |
[
"jerryscript-project",
"jerryscript"
]
| ###### JerryScript revision
Commit: 05dbbd13[](05dbbd134c3b9e2482998f267857dd3722001cd7)
Version: v3.0.0
###### Build platform
Ubuntu 20.04.5 LTS (Linux 5.4.0-144-generic x86_64)
###### Build steps
```sh
python ./tools/build.py --clean --debug --compile-flag=-m32 --compile-flag=-fno-omit-frame-pointer --compile-flag=-fno-common --compile-flag=-fsanitize=address --compile-flag=-g --strip=off --lto=off --error-messages=on --system-allocator=on --logging=on --line-info=on --stack-limit=20
```
###### Test case
<details><summary>testcase</summary>
<p>
```JavaScript
class s { 0 = class { } ; [ 1 ] = class { constructor ( ) { } static name ( s ) { } } ; } new s ( ) ; gc ( ) ; new s ( ) ( e ) ; let t = 32 ;
```
</p>
</details>
``` JavaScript
// poc.js
class s { [ 1 ] = class { constructor ( ) { } static name ( s ) { } } ; }
new s ( ) ;
```
###### Execution steps & Output
```sh
$ ./jerryscript/build/bin/jerry poc.js
ICE: Assertion 'ecma_find_named_property (func_obj_p, ecma_get_magic_string (LIT_MAGIC_STRING_NAME)) == NULL' failed at /jerryscript/jerry-core/vm/vm.c(vm_loop):2173.
Error: JERRY_FATAL_FAILED_ASSERTION
Aborted
```
credits: @EJueon, @Ye0nny of the seclab-yonsei. | Assertion 'ecma_find_named_property (func_obj_p, ecma_get_magic_string (LIT_MAGIC_STRING_NAME)) == NULL' failed at /jerryscript/jerry-core/vm/vm.c(vm_loop):2173. | https://api.github.com/repos/jerryscript-project/jerryscript/issues/5070/comments | 0 | 2023-04-19T03:29:02Z | 2023-04-19T03:29:02Z | https://github.com/jerryscript-project/jerryscript/issues/5070 | 1,674,113,082 | 5,070 |
[
"jerryscript-project",
"jerryscript"
]
| ###### JerryScript revision
Commit: 05dbbd13[](05dbbd134c3b9e2482998f267857dd3722001cd7)
Version: v3.0.0
###### Build platform
Ubuntu 20.04.5 LTS (Linux 5.4.0-144-generic x86_64)
###### Build steps
```sh
python ./tools/build.py --clean --debug --compile-flag=-m32 --compile-flag=-fno-omit-frame-pointer --compile-flag=-fno-common --compile-flag=-fsanitize=address --compile-flag=-g --strip=off --lto=off --error-messages=on --system-allocator=on --logging=on --line-info=on --stack-limit=20
```
###### Test case
``` JavaScript
// poc.js
var t = Function ( ) ;
t [ Symbol . species ] = Object ;
var e = new Proxy ( { constructor : t } , { set : function ( ) { } } ) ;
RegExp . prototype [ Symbol . matchAll ] . call ( e ) ;
```
###### Execution steps & Output
```sh
$ ./jerryscript/build/bin/jerry poc.js
ICE: Assertion '!jcontext_has_pending_exception ()' failed at /jerryscript/jerry-core/jcontext/jcontext.c(jcontext_raise_exception):88.
Error: JERRY_FATAL_FAILED_ASSERTION
Aborted (core dumped)
```
###### Backtrace
```
(gdb) #0 0xf7f40d99 in __kernel_vsyscall ()
#1 0xf7c15276 in raise () from /lib32/libc.so.6
#2 0xf7bfd3f7 in abort () from /lib32/libc.so.6
#3 0x083ecca3 in jerry_port_fatal (code=JERRY_FATAL_FAILED_ASSERTION)
at /jerryscript/jerry-port/common/jerry-port-process.c:29
#4 0x08260d02 in jerry_fatal (code=JERRY_FATAL_FAILED_ASSERTION)
at /jerryscript/jerry-core/jrt/jrt-fatals.c:63
#5 0x08260d64 in jerry_assert_fail (
assertion=0x8434bc0 <str> "!jcontext_has_pending_exception ()",
file=0x8434b00 <str> "/jerryscript/jerry-core/jcontext/jcontext.c",
function=0x8434c20 <__func__.jcontext_raise_exception> "jcontext_raise_exception", line=88)
at /jerryscript/jerry-core/jrt/jrt-fatals.c:83
#6 0x0825e7b0 in jcontext_raise_exception (error=4115661203)
at /jerryscript/jerry-core/jcontext/jcontext.c:88
#7 0x081f52e5 in ecma_raise_standard_error (error_type=JERRY_ERROR_SYNTAX, [0/1762]
msg=ECMA_ERR_INVALID_REGEXP_FLAGS) at /jerryscript/jerry-core/ecma/operations/ecma-exceptions.c:315#8 0x081f5a91 in ecma_raise_syntax_error (msg=ECMA_ERR_INVALID_REGEXP_FLAGS)
at /jerryscript/jerry-core/ecma/operations/ecma-exceptions.c:456
#9 0x08234ac7 in ecma_regexp_parse_flags (flags_str_p=<optimized out>,
flags_p=<optimized out>)
at /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:115
#10 0x0835e0d2 in ecma_builtin_regexp_prototype_match_all (
regexp_obj_p=0xffcd35c0, string_arg=<optimized out>)
at /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-regexp-prototype.c:504
#11 ecma_builtin_regexp_prototype_dispatch_routine (
builtin_routine_id=<optimized out>, this_arg=<optimized out>,
arguments_list_p=<optimized out>, arguments_number=<optimized out>)
at /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-regexp-prototype.c:598
#12 0x081b94a5 in ecma_builtin_dispatch_routine (func_obj_p=<optimized out>,
this_arg_value=<optimized out>, arguments_list_p=0xffcd3690,
arguments_list_len=<optimized out>)
at /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1460
#13 ecma_builtin_dispatch_call (obj_p=<optimized out>,
this_arg_value=<optimized out>, arguments_list_p=<optimized out>,
arguments_list_len=<optimized out>)
at /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1489
#14 0x081fb6b8 in ecma_op_function_call_native_built_in (
func_obj_p=0xf55004c0, this_arg_value=4115662259,
arguments_list_p=0xffcd38d4, arguments_list_len=0)
at /jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1217
#15 0x081fa81d in ecma_op_function_call (func_obj_p=0xf55004c0,
this_arg_value=4115662259, arguments_list_p=0xffcd38d4,
arguments_list_len=0)
at /jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1411
#16 0x0833172e in ecma_builtin_function_prototype_object_call (
func_obj_p=0xf55004c0, arguments_list_p=0xffcd38d0,
arguments_number=<optimized out>)
at /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-function-prototype.c:288
#17 ecma_builtin_function_prototype_dispatch_routine (
builtin_routine_id=<optimized out>, this_arg=<optimized out>,
arguments_list_p=<optimized out>, arguments_number=<optimized out>)
at /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-function-prototype.c:529
#18 0x081b94a5 in ecma_builtin_dispatch_routine (func_obj_p=<optimized out>,
this_arg_value=<optimized out>, arguments_list_p=0xffcd38d0,
arguments_list_len=<optimized out>)
at /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1460
#19 ecma_builtin_dispatch_call (obj_p=<optimized out>,
this_arg_value=<optimized out>, arguments_list_p=<optimized out>,
arguments_list_len=<optimized out>)
at /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1489
#20 0x081fb6b8 in ecma_op_function_call_native_built_in (
func_obj_p=0xf5500460, this_arg_value=4115662019,
arguments_list_p=0xffcd3af4, arguments_list_len=1)
at /jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1217
#21 0x081fa81d in ecma_op_function_call (func_obj_p=0xf5500460,
this_arg_value=4115662019, arguments_list_p=0xffcd3af4,
arguments_list_len=1)
at /jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1411
#22 0x081fa5cf in ecma_op_function_validated_call (callee=4115661923,
this_arg_value=4115662019, arguments_list_p=0xffcd3af4,
arguments_list_len=1)
at /jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1371
#23 0x082d7631 in opfunc_call (frame_ctx_p=<optimized out>)
at /jerryscript/jerry-core/vm/vm.c:758
#24 vm_execute (frame_ctx_p=0xffcd3ac0)
at /jerryscript/jerry-core/vm/vm.c:5217
#25 0x082d4f62 in vm_run (shared_p=0xffcd3bb0, this_binding_value=4119870595,
lex_env_p=0xf57007b0)
at /jerryscript/jerry-core/vm/vm.c:5312
#26 0x082d4c39 in vm_run_global (bytecode_p=<optimized out>,
function_object_p=<optimized out>)
at /jerryscript/jerry-core/vm/vm.c:286
#27 0x0812a4e5 in jerry_run (script=4115663075)
at /jerryscript/jerry-core/api/jerryscript.c:548
#28 0x083eac3f in jerryx_source_exec_script (path_p=0xffcd5235 "test.js")
at /jerryscript/jerry-ext/util/sources.c:68
#29 0x0812162d in main (argc=<optimized out>, argv=<optimized out>)
at /jerryscript/jerry-main/main-desktop.c:156
(gdb) quit
```
credits: @EJueon, @Ye0nny of the seclab-yonsei. | Assertion '!jcontext_has_pending_exception ()' failed at /jerryscript/jerry-core/jcontext/jcontext.c(jcontext_raise_exception):88. | https://api.github.com/repos/jerryscript-project/jerryscript/issues/5069/comments | 0 | 2023-04-16T13:13:26Z | 2023-04-16T13:13:26Z | https://github.com/jerryscript-project/jerryscript/issues/5069 | 1,669,965,859 | 5,069 |
[
"jerryscript-project",
"jerryscript"
]
| ###### JerryScript revision
Commit: 05dbbd13[](05dbbd134c3b9e2482998f267857dd3722001cd7)
Version: v3.0.0
###### Build platform
Ubuntu 20.04.5 LTS (Linux 5.4.0-144-generic x86_64)
###### Build steps
```sh
python ./tools/build.py --clean --debug --compile-flag=-m32 --compile-flag=-fno-omit-frame-pointer --compile-flag=-fno-common --compile-flag=-fsanitize=address --compile-flag=-g --strip=off --lto=off --error-messages=on --system-allocator=on --logging=on --line-info=on --stack-limit=20
```
###### Test case
``` JavaScript
// poc.js
var x = BigInt ( 8 ** 16 + 1 ) ;
x ** BigInt ( 4 ) / x;
```
###### Execution steps & Output
```sh
$ ./jerryscript/build/bin/jerry poc.js
ICE: Assertion 'dividend_end_p[0] == divisor_high && dividend_end_p[-1] < divisor_high' failed at /jerryscript/jerry-core/ecma/operations/ecma-big-uint.c(ecma_big_uint_div_mod):1119.
Error: JERRY_FATAL_FAILED_ASSERTION
Aborted
```
###### Backtrace
```
(gdb) #0 0xf7efdd99 in __kernel_vsyscall ()
#1 0xf7bd2276 in raise () from /lib32/libc.so.6
#2 0xf7bba3f7 in abort () from /lib32/libc.so.6
#3 0x083ecca3 in jerry_port_fatal (code=JERRY_FATAL_FAILED_ASSERTION)
at /jerryscript/jerry-port/common/jerry-port-process.c:29
#4 0x08260d02 in jerry_fatal (code=JERRY_FATAL_FAILED_ASSERTION)
at /jerryscript/jerry-core/jrt/jrt-fatals.c:63
#5 0x08260d64 in jerry_assert_fail (
assertion=0x846e200 <str> "dividend_end_p[0] == divisor_high && dividend_end_p[-1] < divisor_high",
file=0x846d800 <str> "/jerryscript/jerry-core/ecma/operations/ecma-big-uint.c",
function=0x846e080 <__func__.ecma_big_uint_div_mod> "ecma_big_uint_div_mod", line=1119)
at /jerryscript/jerry-core/jrt/jrt-fatals.c:83
#6 0x08380b54 in ecma_big_uint_div_mod (dividend_value_p=0xf4203c40,
divisor_value_p=0xf5600630, is_mod=<optimized out>)
at /jerryscript/jerry-core/ecma/operations/ecma-big-uint.c:1119
#7 0x081dfc96 in ecma_bigint_div_mod (left_value=4095753286,
right_value=4116710966, is_mod=<optimized out>)
at /jerryscript/jerry-core/ecma/operations/ecma-bigint.c:1337
#8 0x082be8b9 in do_number_arithmetic (op=<optimized out>,
left_value=<optimized out>, right_value=<optimized out>)
at /jerryscript/jerry-core/vm/opcodes-ecma-arithmetics.c:148
#9 0x082dd6f0 in vm_loop (frame_ctx_p=0xffdc12c0)
at /jerryscript/jerry-core/vm/vm.c:3563
#10 0x082d6b83 in vm_execute (frame_ctx_p=0xffdc12c0)
at /jerryscript/jerry-core/vm/vm.c:5211
#11 0x082d4f62 in vm_run (shared_p=0xffdc13d0, this_binding_value=4118822019,
lex_env_p=0xf56007b0)
at /jerryscript/jerry-core/vm/vm.c:5312
#12 0x082d4c39 in vm_run_global (bytecode_p=<optimized out>,
function_object_p=<optimized out>)
at /jerryscript/jerry-core/vm/vm.c:286
#13 0x0812a4e5 in jerry_run (script=4114614595)
at /jerryscript/jerry-core/api/jerryscript.c:548
#14 0x083eac3f in jerryx_source_exec_script (
path_p=0xffdc21e7 "poc.js")
at /jerryscript/jerry-ext/util/sources.c:68
#15 0x0812162d in main (argc=<optimized out>, argv=<optimized out>)
at /jerryscript/jerry-main/main-desktop.c:156
(gdb) quit
```
credits: @EJueon, @Ye0nny of the seclab-yonsei. | Assertion 'dividend_end_p[0] == divisor_high && dividend_end_p[-1] < divisor_high' failed at /jerryscript/jerry-core/ecma/operations/ecma-big-uint.c(ecma_big_uint_div_mod) | https://api.github.com/repos/jerryscript-project/jerryscript/issues/5068/comments | 0 | 2023-04-08T14:19:33Z | 2023-04-08T14:19:33Z | https://github.com/jerryscript-project/jerryscript/issues/5068 | 1,659,537,585 | 5,068 |
[
"jerryscript-project",
"jerryscript"
]
| ###### JerryScript revision
Commit: 05dbbd13[](05dbbd134c3b9e2482998f267857dd3722001cd7)
Version: v3.0.0
###### Build platform
Ubuntu 20.04.5 LTS (Linux 5.4.0-144-generic x86_64)
###### Build steps
```sh
python ./tools/build.py --clean --compile-flag=-m32 --compile-flag=-fno-omit-frame-pointer --compile-flag=-fno-common --compile-flag=-fsanitize=address --compile-flag=-g --strip=off --lto=off --error-messages=on --system-allocator=on --logging=on --line-info=on --stack-limit=20
```
###### Test case
``` JavaScript
// poc.js
a = new Int16Array ( 1073741825 ) . sort ( ) ;
```
###### Execution steps & Output
```sh
$ ./jerryscript/build/bin/jerry poc.js
==3598395==ERROR: AddressSanitizer: heap-buffer-overflow on address 0xf5100634 at pc 0x5666342e bp 0xffaaafb8 sp 0xffaaafa8
WRITE of size 4 at 0xf5100634 thread T0
#0 0x5666342d in ecma_builtin_typedarray_prototype_sort /jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-typedarray-prototype.c:1261
#1 0x5666342d in ecma_builtin_typedarray_prototype_dispatch_routine /jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-typedarray-prototype.c:2007
#2 0x5665ea28 in ecma_builtin_dispatch_routine /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1460
#3 0x5665ea28 in ecma_builtin_dispatch_call /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1489
#4 0x56673db7 in ecma_op_function_call_native_built_in /jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1217
#5 0x56675c84 in ecma_op_function_call /jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1411
#6 0x566d6e89 in opfunc_call /jerryscript/jerry-core/vm/vm.c:758
#7 0x566d6e89 in vm_execute /jerryscript/jerry-core/vm/vm.c:5217
#8 0x566d8152 in vm_run /jerryscript/jerry-core/vm/vm.c:5312
#9 0x566d838f in vm_run_global /jerryscript/jerry-core/vm/vm.c:286
#10 0x5663682e in jerry_run /jerryscript/jerry-core/api/jerryscript.c:548
#11 0x5672b354 in jerryx_repl /jerryscript/jerry-ext/util/repl.c:66
#12 0x5662ef56 in main /jerryscript/jerry-main/main-desktop.c:226
#13 0xf7621ed4 in __libc_start_main (/lib32/libc.so.6+0x1aed4)
#14 0x56631fb4 in _start (/jerryscript/build/bin/jerry+0x12fb4)
0xf5100634 is located 0 bytes to the right of 4-byte region [0xf5100630,0xf5100634)
allocated by thread T0 here:
#0 0xf7a0a817 in __interceptor_malloc ../../../../../src/libsanitizer/asan/asan_malloc_linux.cc:144
#1 0x56631ae4 in jmem_heap_alloc /jerryscript/jerry-core/jmem/jmem-heap.c:254
#2 0x56696d8d in jmem_heap_gc_and_alloc_block /jerryscript/jerry-core/jmem/jmem-heap.c:291
#3 0x56663281 in ecma_builtin_typedarray_prototype_sort /jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-typedarray-prototype.c:1248
#4 0x56663281 in ecma_builtin_typedarray_prototype_dispatch_routine /jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-typedarray-prototype.c:2007
#5 0x5665ea28 in ecma_builtin_dispatch_routine /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1460
#6 0x5665ea28 in ecma_builtin_dispatch_call /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1489
#7 0x56673db7 in ecma_op_function_call_native_built_in /jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1217
#8 0x56675c84 in ecma_op_function_call /jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1411
#9 0x566d6e89 in opfunc_call /jerryscript/jerry-core/vm/vm.c:758
#10 0x566d6e89 in vm_execute /jerryscript/jerry-core/vm/vm.c:5217
#11 0x566d8152 in vm_run /jerryscript/jerry-core/vm/vm.c:5312
#12 0x566d838f in vm_run_global /jerryscript/jerry-core/vm/vm.c:286
#13 0x5663682e in jerry_run /jerryscript/jerry-core/api/jerryscript.c:548
#14 0x5672b354 in jerryx_repl /jerryscript/jerry-ext/util/repl.c:66
#15 0x5662ef56 in main /jerryscript/jerry-main/main-desktop.c:226
#16 0xf7621ed4 in __libc_start_main (/lib32/libc.so.6+0x1aed4)
SUMMARY: AddressSanitizer: heap-buffer-overflow /jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-typedarray-prototype.c:1261 in ecma_builtin_typedarray_prototype_sort
Shadow bytes around the buggy address:
0x3ea20070: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x3ea20080: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x3ea20090: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x3ea200a0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x3ea200b0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
=>0x3ea200c0: fa fa fa fa fa fa[04]fa fa fa 00 fa fa fa 00 00
0x3ea200d0: fa fa 00 02 fa fa 05 fa fa fa 00 00 fa fa 00 fa
0x3ea200e0: fa fa 00 04 fa fa fd fd fa fa 00 06 fa fa 00 03
0x3ea200f0: fa fa 00 07 fa fa 00 00 fa fa fa fa fa fa fa fa
0x3ea20100: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x3ea20110: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Container overflow: fc
Array cookie: ac
Intra object redzone: bb
ASan internal: fe
Left alloca redzone: ca
Right alloca redzone: cb
Shadow gap: cc
==3598395==ABORTING
```
---
with debugging mode(--debug)
###### Outputs
```
ICE: Assertion 'buffer_index == info_p->length' failed at /jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-typedarray-prototype.c(ecma_builtin_typedarray_prototype_sort):1265.
Error: JERRY_FATAL_FAILED_ASSERTION
```
credits: @EJueon, @Ye0nny of the seclab-yonsei.
| heap-buffer-overflow in ecma_builtin_typedarray_prototype_sort | https://api.github.com/repos/jerryscript-project/jerryscript/issues/5067/comments | 0 | 2023-04-08T13:31:08Z | 2023-04-08T13:39:28Z | https://github.com/jerryscript-project/jerryscript/issues/5067 | 1,659,524,592 | 5,067 |
[
"jerryscript-project",
"jerryscript"
]
| ###### JerryScript revision
Commit: https://github.com/jerryscript-project/jerryscript/commit/1a2c04763aba49f52b1537acd3730098c873511c
Version: v3.0.0
###### Build platform
Ubuntu 20.04.5 LTS (Linux 5.4.0-144-generic x86_64)
###### Build steps
```sh
python ./tools/build.py --clean --debug --compile-flag=-m32 --compile-flag=-fno-omit-frame-pointer --compile-flag=-fno-common --compile-flag=-fsanitize=address --compile-flag=-g --strip=off --lto=off --error-messages=on --system-allocator=on --logging=on --line-info=on --stack-limit=20
```
###### Test case
```javascript
// poc1.js
class C {#static async''
```
###### Execution steps & Output
```
$ ./jerryscript/build/bin/jerry poc1.js
=================================================================
==3572149==ERROR: AddressSanitizer: heap-buffer-overflow on address 0xf5500959 at pc 0x0839f1a4 bp 0xffbc0428 sp 0xffbc0420
READ of size 1 at 0xf5500959 thread T0
#0 0x839f1a3 in lexer_compare_identifier_to_chars jerryscript/jerry-core/parser/js/js-lexer.c:3297:9
#1 0x839f4c1 in lexer_compare_identifiers jerryscript/jerry-core/parser/js/js-lexer.c
#2 0x83b5a37 in parser_check_duplicated_private_field jerryscript/jerry-core/parser/js/js-parser-expr.c:416:9
#3 0x83a2c8c in parser_parse_class_body jerryscript/jerry-core/parser/js/js-parser-expr.c:701:9
#4 0x83a2c8c in parser_parse_class jerryscript/jerry-core/parser/js/js-parser-expr.c:1110:27
#5 0x83c9958 in parser_parse_statements jerryscript/jerry-core/parser/js/js-parser-statm.c:2787:9
#6 0x8284a25 in parser_parse_source jerryscript/jerry-core/parser/js/js-parser.c:2280:5
#7 0x8282c6f in parser_parse_script jerryscript/jerry-core/parser/js/js-parser.c:3326:38
#8 0x8129a7c in jerry_parse_common jerryscript/jerry-core/api/jerryscript.c:412:21
#9 0x8129697 in jerry_parse jerryscript/jerry-core/api/jerryscript.c:480:10
#10 0x83ea951 in jerryx_source_parse_script jerryscript/jerry-ext/util/sources.c:52:26
#11 0x83eac11 in jerryx_source_exec_script jerryscript/jerry-ext/util/sources.c:63:26
#12 0x812162c in main jerryscript/jerry-main/main-desktop.c:156:20
#13 0xf7bf3ed4 in __libc_start_main (/lib32/libc.so.6+0x1aed4)
#14 0x8078645 in _start (jerryscript/build/bin/jerry+0x8078645)
0xf5500959 is located 0 bytes to the right of 25-byte region [0xf5500940,0xf5500959)
allocated by thread T0 here:
#0 0x80efe65 in malloc (jerryscript/build/bin/jerry+0x80efe65)
#1 0x83ec157 in jerry_port_source_read jerryscript/jerry-port/common/jerry-port-fs.c:72:45
#2 0x83ea7ce in jerryx_source_parse_script jerryscript/jerry-ext/util/sources.c:33:28
#3 0x83eac11 in jerryx_source_exec_script jerryscript/jerry-ext/util/sources.c:63:26
#4 0x812162c in main jerryscript/jerry-main/main-desktop.c:156:20
#5 0xf7bf3ed4 in __libc_start_main (/lib32/libc.so.6+0x1aed4)
SUMMARY: AddressSanitizer: heap-buffer-overflow jerryscript/jerry-core/parser/js/js-lexer.c:3297:9 in lexer_compare_identifier_to_chars
Shadow bytes around the buggy address:
0x3eaa00d0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x3eaa00e0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x3eaa00f0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x3eaa0100: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x3eaa0110: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
=>0x3eaa0120: fa fa 00 00 04 fa fa fa 00 00 00[01]fa fa 00 00
0x3eaa0130: 00 fa fa fa 00 00 00 00 fa fa 00 00 04 fa fa fa
0x3eaa0140: 00 00 00 00 fa fa 00 00 03 fa fa fa 00 00 00 fa
0x3eaa0150: fa fa 00 00 00 00 fa fa 00 00 00 00 fa fa 00 00
0x3eaa0160: 00 fa fa fa 00 00 00 00 fa fa 00 00 00 00 fa fa
0x3eaa0170: 00 00 00 00 fa fa fa fa fa fa fa fa fa fa fa fa
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Container overflow: fc
Array cookie: ac
Intra object redzone: bb
ASan internal: fe
Left alloca redzone: ca
Right alloca redzone: cb
Shadow gap: cc
==3572149==ABORTING
```
---
###### Test case+
```javascript
// poc2.js
class C {#static async*''
```
###### Execution steps & Output+
```
$ ./jerryscript/build/bin/jerry poc2.js
=================================================================
==3572558==ERROR: AddressSanitizer: heap-buffer-overflow on address 0xf540095a at pc 0x0839f1a4 bp 0xffe49808 sp 0xffe49800
READ of size 1 at 0xf540095a thread T0
#0 0x839f1a3 in lexer_compare_identifier_to_chars jerryscript/jerry-core/parser/js/js-lexer.c:3297:9
#1 0x839f4c1 in lexer_compare_identifiers jerryscript/jerry-core/parser/js/js-lexer.c
#2 0x83b5a37 in parser_check_duplicated_private_field jerryscript/jerry-core/parser/js/js-parser-expr.c:416:9
#3 0x83a2edb in parser_parse_class_body jerryscript/jerry-core/parser/js/js-parser-expr.c:728:9
#4 0x83a2edb in parser_parse_class jerryscript/jerry-core/parser/js/js-parser-expr.c:1110:27
#5 0x83c9958 in parser_parse_statements jerryscript/jerry-core/parser/js/js-parser-statm.c:2787:9
#6 0x8284a25 in parser_parse_source jerryscript/jerry-core/parser/js/js-parser.c:2280:5
#7 0x8282c6f in parser_parse_script jerryscript/jerry-core/parser/js/js-parser.c:3326:38
#8 0x8129a7c in jerry_parse_common jerryscript/jerry-core/api/jerryscript.c:412:21
#9 0x8129697 in jerry_parse jerryscript/jerry-core/api/jerryscript.c:480:10
#10 0x83ea951 in jerryx_source_parse_script jerryscript/jerry-ext/util/sources.c:52:26
#11 0x83eac11 in jerryx_source_exec_script jerryscript/jerry-ext/util/sources.c:63:26
#12 0x812162c in main jerryscript/jerry-main/main-desktop.c:156:20
#13 0xf7bc3ed4 in __libc_start_main (/lib32/libc.so.6+0x1aed4)
#14 0x8078645 in _start (jerryscript/build/bin/jerry+0x8078645)
0xf540095a is located 0 bytes to the right of 26-byte region [0xf5400940,0xf540095a)
allocated by thread T0 here:
#0 0x80efe65 in malloc (jerryscript/build/bin/jerry+0x80efe65)
#1 0x83ec157 in jerry_port_source_read jerryscript/jerry-port/common/jerry-port-fs.c:72:45
#2 0x83ea7ce in jerryx_source_parse_script jerryscript/jerry-ext/util/sources.c:33:28
#3 0x83eac11 in jerryx_source_exec_script jerryscript/jerry-ext/util/sources.c:63:26
#4 0x812162c in main jerryscript/jerry-main/main-desktop.c:156:20
#5 0xf7bc3ed4 in __libc_start_main (/lib32/libc.so.6+0x1aed4)
SUMMARY: AddressSanitizer: heap-buffer-overflow jerryscript/jerry-core/parser/js/js-lexer.c:3297:9 in lexer_compare_identifier_to_chars
Shadow bytes around the buggy address:
0x3ea800d0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x3ea800e0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x3ea800f0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x3ea80100: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x3ea80110: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
=>0x3ea80120: fa fa 00 00 04 fa fa fa 00 00 00[02]fa fa 00 00
0x3ea80130: 00 fa fa fa 00 00 00 00 fa fa 00 00 04 fa fa fa
0x3ea80140: 00 00 00 00 fa fa 00 00 03 fa fa fa 00 00 00 fa
0x3ea80150: fa fa 00 00 00 00 fa fa 00 00 00 00 fa fa 00 00
0x3ea80160: 00 fa fa fa 00 00 00 00 fa fa 00 00 00 00 fa fa
0x3ea80170: 00 00 00 00 fa fa fa fa fa fa fa fa fa fa fa fa
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Container overflow: fc
Array cookie: ac
Intra object redzone: bb
ASan internal: fe
Left alloca redzone: ca
Right alloca redzone: cb
Shadow gap: cc
==3572558==ABORTING
```
Credits:
@Ye0nny, @EJueon of the seclab-yonsei.
| heap-buffer-overflow in lexer_compare_identifier_to_chars | https://api.github.com/repos/jerryscript-project/jerryscript/issues/5066/comments | 0 | 2023-04-08T12:50:49Z | 2023-04-08T12:50:49Z | https://github.com/jerryscript-project/jerryscript/issues/5066 | 1,659,514,220 | 5,066 |
[
"jerryscript-project",
"jerryscript"
]
|
###### JerryScript revision
2.4.0
###### Build platform
ubuntu20.04
### Description
I executed the following test cases and found the resuts of jerry were different from other js engines.
The first test case should return an array sorted from smallest to largest, but jerry didn't sort the array.
The second test case takes an empty function as the parameter of sort(), and it should return the original array, while jerry returns a reversed array.
Looking foward to your reply.
### Test case1
```
function foo1() {
foo2.prototype = arguments;
new foo2();
}
function foo2() {
var x = Array.prototype.sort.call(this);
for (var i = 0; i < x.length; i++) {
print(x[i]);
}
}
foo1(3,2,4,1);
```
### Output
3
2
4
1
### Expected behavior
1
2
3
4
### Test case2
```
var a = [3, 2, 4, 1].sort(() => {});
for (var i = 0; i < a.length; i++) {
print(a[i]);
}
```
### Output
1
4
2
3
### Expected bahavior
3
2
4
1 | Two problems in Array.prototype.sort | https://api.github.com/repos/jerryscript-project/jerryscript/issues/5065/comments | 0 | 2023-04-08T03:03:39Z | 2023-04-08T03:03:39Z | https://github.com/jerryscript-project/jerryscript/issues/5065 | 1,659,350,605 | 5,065 |
[
"jerryscript-project",
"jerryscript"
]
| ###### JerryScript revision
Commit: https://github.com/jerryscript-project/jerryscript/commit/1a2c04763aba49f52b1537acd3730098c873511c
Version: v3.0.0
###### Build platform
Ubuntu 20.04.5 LTS (Linux 5.4.0-144-generic x86_64)
###### Build steps
```sh
python ./tools/build.py --clean --debug --compile-flag=-m32 --compile-flag=-fno-omit-frame-pointer --compile-flag=-fno-common --compile-flag=-fsanitize=address --compile-flag=-g --strip=off --lto=off --error-messages=on --system-allocator=on --logging=on --line-info=on --stack-limit=20
```
###### Test case
```javascript
// poc.js
class C { async#* method (
```
###### Execution steps & Output
```
$ ./jerryscript/build/bin/jerry poc.js
ICE: Assertion 'context_p->next_scanner_info_p->type == SCANNER_TYPE_FUNCTION' failed at jerryscript/jerry-core/parser/js/js-parser.c(parser_parse_function_arguments):1587.
Error: JERRY_FATAL_FAILED_ASSERTION
Aborted
```
###### Backtrace
```
#0 0xf7fcfd99 in __kernel_vsyscall ()
#1 0xf7ca4276 in raise () from /lib32/libc.so.6
#2 0xf7c8c3f7 in abort () from /lib32/libc.so.6
#3 0x083ecca3 in jerry_port_fatal (code=JERRY_FATAL_FAILED_ASSERTION) at jerryscript/jerry-port/common/jerry-port-process.c:29
#4 0x08260d02 in jerry_fatal (code=JERRY_FATAL_FAILED_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:63
#5 0x08260d64 in jerry_assert_fail (assertion=0x84433e0 <str> "context_p->next_scanner_info_p->type == SCANNER_TYPE_FUNCTION",
file=0x8442ec0 <str> "jerryscript/jerry-core/parser/js/js-parser.c",
function=0x8443440 <__func__.parser_parse_function_arguments> "parser_parse_function_arguments", line=1587)
at jerryscript/jerry-core/jrt/jrt-fatals.c:83
#6 0x0827592c in parser_parse_function_arguments (context_p=0xffffcd30, end_type=<optimized out>)
at jerryscript/jerry-core/parser/js/js-parser.c:1587
#7 0x0827240a in parser_parse_function (context_p=<optimized out>, status_flags=<optimized out>) at jerryscript/jerry-core/parser/js/js-parser.c:2685
#8 0x08399b84 in lexer_construct_function_object (context_p=0xffffcd30, extra_status_flags=34717702)
at jerryscript/jerry-core/parser/js/js-lexer.c:2695
#9 0x083a30d3 in parser_parse_class_body (context_p=<optimized out>, opts=<optimized out>, class_name_index=0)
at jerryscript/jerry-core/parser/js/js-parser-expr.c:908
#10 parser_parse_class (context_p=<optimized out>, is_statement=<optimized out>) at jerryscript/jerry-core/parser/js/js-parser-expr.c:1110
#11 0x083c9959 in parser_parse_statements (context_p=<optimized out>) at jerryscript/jerry-core/parser/js/js-parser-statm.c:2787
#12 0x08284a26 in parser_parse_source (source_p=0xffffd030, parse_opts=<optimized out>, options_p=0xffffd100)
at jerryscript/jerry-core/parser/js/js-parser.c:2280
#13 0x08282c70 in parser_parse_script (source_p=0xffffd030, parse_opts=0, options_p=0xffffd100) at jerryscript/jerry-core/parser/js/js-parser.c:3326
#14 0x08129a7d in jerry_parse_common (source_p=0xffffd030, options_p=<optimized out>, parse_opts=0) at jerryscript/jerry-core/api/jerryscript.c:412
#15 0x08129698 in jerry_parse (source_p=<optimized out>, source_size=<optimized out>, options_p=<optimized out>)
at jerryscript/jerry-core/api/jerryscript.c:480
#16 0x083ea952 in jerryx_source_parse_script (path_p=<optimized out>) at jerryscript/jerry-ext/util/sources.c:52
#17 0x083eac12 in jerryx_source_exec_script (path_p=0xffffd5e0 "poc.js") at jerryscript/jerry-ext/util/sources.c:63
#18 0x0812162d in main (argc=<optimized out>, argv=<optimized out>) at jerryscript/jerry-main/main-desktop.c:156
```
Credits:
@Ye0nny, @EJueon of the seclab-yonsei.
| Assertion 'context_p->next_scanner_info_p->type == SCANNER_TYPE_FUNCTION' failed at jerryscript/jerry-core/parser/js/js-parser.c(parser_parse_function_arguments) | https://api.github.com/repos/jerryscript-project/jerryscript/issues/5064/comments | 0 | 2023-04-06T14:02:51Z | 2023-04-06T14:02:51Z | https://github.com/jerryscript-project/jerryscript/issues/5064 | 1,657,488,796 | 5,064 |
[
"jerryscript-project",
"jerryscript"
]
| ###### JerryScript revision
Commit: 05dbbd13[](05dbbd134c3b9e2482998f267857dd3722001cd7)
Version: v3.0.0
###### Build platform
Ubuntu 20.04.5 LTS (Linux 5.4.0-144-generic x86_64)
###### Build steps
```sh
python ./tools/build.py --clean --debug --compile-flag=-m32 --compile-flag=-fno-omit-frame-pointer --compile-flag=-fno-common --compile-flag=-fsanitize=address --compile-flag=-g --strip=off --lto=off --error-messages=on --system-allocator=on --logging=on --line-info=on --stack-limit=20
```
###### Test case
``` JavaScript
// poc.js
async ( v1 = eval ( " " ) ) => { " use strict " ; eval ( " " ) ; }
```
###### Execution steps & Output
```sh
$ ./jerryscript/build/bin/jerry poc.js
ICE: Assertion 'context_p->stack_depth <= 1' failed at jerryscript/jerry-core/parser/js/js-parser-statm.c(parser_parse_statements):2621.
Error: JERRY_FATAL_FAILED_ASSERTION
Aborted
```
###### Backtrace
```
#0 0xf7ef4549 in __kernel_vsyscall ()
#1 0xf7bb7416 in raise () from /lib/i386-linux-gnu/libc.so.6
#2 0xf7b9f3f7 in abort () from /lib/i386-linux-gnu/libc.so.6
#3 0x0844315a in jerry_port_fatal (code=JERRY_FATAL_FAILED_ASSERTION)
at jerryscript/jerry-port/common/jerry-port-process.c:29
#4 0x0827f2e5 in jerry_fatal (code=JERRY_FATAL_FAILED_ASSERTION)
at jerryscript/jerry-core/jrt/jrt-fatals.c:63
#5 0x0827f337 in jerry_assert_fail (
assertion=0x84cf680 <str> "context_p->stack_depth <= 1",
file=0x84cf5c0 <str> "jerryscript/jerry-core/parser/js/js-parser-statm.c",
function=0x84cf640 <__func__.parser_parse_statements> "parser_parse_statements", line=2621)
at jerryscript/jerry-core/jrt/jrt-fatals.c:83
#6 0x08422aea in parser_parse_statements (context_p=<optimized out>)
at jerryscript/jerry-core/parser/js/js-parser-statm.c:2621
#7 0x082a0cd5 in parser_parse_arrow_function (context_p=<optimized out>,
status_flags=<optimized out>)
at jerryscript/jerry-core/parser/js/js-parser.c:2838
#8 0x083d5570 in lexer_construct_function_object (context_p=0xffa5d050,
extra_status_flags=106498)
at jerryscript/jerry-core/parser/js/js-lexer.c:2699
#9 0x083fac8d in parser_parse_function_expression (context_p=<optimized out>,
status_flags=<optimized out>)
at jerryscript/jerry-core/parser/js/js-parser-expr.c:1640
#10 0x083efe62 in parser_parse_unary_expression (context_p=<optimized out>,
grouping_level_p=<optimized out>)
at jerryscript/jerry-core/parser/js/js-parser-expr.c:2030
#11 parser_parse_expression (context_p=<optimized out>,
options=<optimized out>)
at jerryscript/jerry-core/parser/js/js-parser-expr.c:4115
#12 0x083f523e in parser_parse_block_expression (context_p=0xffa5d050,
options=0)
at jerryscript/jerry-core/parser/js/js-parser-expr.c:4065
#13 0x08415860 in parser_parse_statements (context_p=<optimized out>)
at jerryscript/jerry-core/parser/js/js-parser-statm.c:3079
#14 0x082a6c48 in parser_parse_source (source_p=<optimized out>,
parse_opts=<optimized out>, options_p=0xffa5d420)
at jerryscript/jerry-core/parser/js/js-parser.c:2280
#15 0x082a41f7 in parser_parse_script (source_p=0xffa5d350, parse_opts=0,
options_p=0xffa5d420)
at jerryscript/jerry-core/parser/js/js-parser.c:3326
#16 0x0812e222 in jerry_parse_common (source_p=<optimized out>,
options_p=<optimized out>, parse_opts=<optimized out>)
at jerryscript/jerry-core/api/jerryscript.c:412
#17 0x0812dd5d in jerry_parse (source_p=<optimized out>,
source_size=<optimized out>, options_p=<optimized out>)
at jerryscript/jerry-core/api/jerryscript.c:480
#18 0x0844099f in jerryx_source_parse_script (path_p=<optimized out>)
at jerryscript/jerry-ext/util/sources.c:52
#19 0x08440d03 in jerryx_source_exec_script (path_p=0xffa5e089 "poc.js")
at jerryscript/jerry-ext/util/sources.c:63
#20 0x08121609 in main (argc=<optimized out>, argv=<optimized out>)
at jerryscript/jerry-main/main-desktop.c:156
```
credits: @EJueon, @Ye0nny of the seclab-yonsei. | Assertion 'context_p->stack_depth <= 1' failed at jerryscript/jerry-core/parser/js/js-parser-statm.c(parser_parse_statements) | https://api.github.com/repos/jerryscript-project/jerryscript/issues/5063/comments | 0 | 2023-04-06T13:34:48Z | 2023-04-08T14:20:28Z | https://github.com/jerryscript-project/jerryscript/issues/5063 | 1,657,441,988 | 5,063 |
[
"jerryscript-project",
"jerryscript"
]
| ###### JerryScript revision
Commit: https://github.com/jerryscript-project/jerryscript/commit/1a2c04763aba49f52b1537acd3730098c873511c
Version: v3.0.0
###### Build platform
Ubuntu 20.04.5 LTS (Linux 5.4.0-144-generic x86_64)
###### Build steps
```sh
python ./tools/build.py --clean --debug --compile-flag=-m32 --compile-flag=-fno-omit-frame-pointer --compile-flag=-fno-common --compile-flag=-fsanitize=address --compile-flag=-g --strip=off --lto=off --error-messages=on --system-allocator=on --logging=on --line-info=on --stack-limit=20
```
###### Test case
```javascript
// poc.js
( async ( ) => { for await ( const b of n ) { continue ;
```
###### Execution steps & Output
```
$ ./jerryscript/build/bin/jerry poc.js
^
Unhandled exception: SyntaxError: Unexpected end of input [poc.js:2:1]
ICE: Assertion 'JERRY_CONTEXT (jmem_heap_allocated_size) == 0' failed at jerryscript/jerry-core/jmem/jmem-heap.c(jmem_heap_finalize):108.
Error: JERRY_FATAL_FAILED_ASSERTION
Aborted
```
###### Backtrace
```
#0 0xf7fcfd99 in __kernel_vsyscall ()
#1 0xf7ca4276 in raise () from /lib32/libc.so.6
#2 0xf7c8c3f7 in abort () from /lib32/libc.so.6
#3 0x083ecca3 in jerry_port_fatal (code=JERRY_FATAL_FAILED_ASSERTION) at jerryscript/jerry-port/common/jerry-port-process.c:29
#4 0x08260d02 in jerry_fatal (code=JERRY_FATAL_FAILED_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:63
#5 0x08260d64 in jerry_assert_fail (assertion=0x84351c0 <str> "JERRY_CONTEXT (jmem_heap_allocated_size) == 0", file=0x8435220 <str> "jerryscript/jerry-core/jmem/jmem-heap.c", function=0x84352a0 <__func__.jmem_heap_finalize> "jmem_heap_finalize", line=108) at jerryscript/jerry-core/jrt/jrt-fatals.c:83
#6 0x0825ef5f in jmem_heap_finalize () at jerryscript/jerry-core/jmem/jmem-heap.c:108
#7 0x0825eab1 in jmem_finalize () at jerryscript/jerry-core/jmem/jmem-allocator.c:171
#8 0x08128c76 in jerry_cleanup () at jerryscript/jerry-core/api/jerryscript.c:240
#9 0x08122416 in main (argc=<optimized out>, argv=<optimized out>) at jerryscript/jerry-main/main-desktop.c:264
```
Credits:
@Ye0nny, @EJueon of the seclab-yonsei.
| Assertion 'JERRY_CONTEXT (jmem_heap_allocated_size) == 0' failed at jerryscript/jerry-core/jmem/jmem-heap.c(jmem_heap_finalize):108. | https://api.github.com/repos/jerryscript-project/jerryscript/issues/5062/comments | 0 | 2023-04-06T13:12:15Z | 2023-04-06T13:12:15Z | https://github.com/jerryscript-project/jerryscript/issues/5062 | 1,657,404,755 | 5,062 |
[
"jerryscript-project",
"jerryscript"
]
| ###### JerryScript revision
Commit: https://github.com/jerryscript-project/jerryscript/commit/1a2c04763aba49f52b1537acd3730098c873511c
Version: v3.0.0
###### Build platform
Ubuntu 20.04.5 LTS (Linux 5.4.0-144-generic x86_64)
###### Build steps
```sh
python ./tools/build.py --clean --debug --compile-flag=-m32 --compile-flag=-fno-omit-frame-pointer --compile-flag=-fno-common --compile-flag=-fsanitize=address --compile-flag=-g --strip=off --lto=off --error-messages=on --system-allocator=on --logging=on --line-info=on --stack-limit=20
```
###### Test case
```javascript
// poc.js
class v0 { v1 = class v2 { } }
```
###### Execution steps & Output
```sh
$ ./jerryscript/build/bin/jerry poc.js
ICE: Assertion 'context_p->scope_stack_size == PARSER_MAXIMUM_DEPTH_OF_SCOPE_STACK' failed at jerryscript/jerry-core/parser/js/js-parser-expr.c(parser_parse_class):1068.
Error: JERRY_FATAL_FAILED_ASSERTION
Aborted
```
Credits:
@Ye0nny, @EJueon of the seclab-yonsei. | Assertion 'context_p->scope_stack_size == PARSER_MAXIMUM_DEPTH_OF_SCOPE_STACK' failed at jerryscript/jerry-core/parser/js/js-parser-expr.c(parser_parse_class):1068. | https://api.github.com/repos/jerryscript-project/jerryscript/issues/5061/comments | 0 | 2023-04-06T10:46:13Z | 2023-04-06T10:46:13Z | https://github.com/jerryscript-project/jerryscript/issues/5061 | 1,657,176,424 | 5,061 |
[
"jerryscript-project",
"jerryscript"
]
| ### JerryScript revision
2.4.0
### Build platform
ubuntu20.04
### Description
The following code caused an aborted(core dumped) in jerryscript. I guess there may be some problems in the apply() method because jerry can output `b.concat(a).length` correctly.
### Test case
```sh
var a = [];
a.length = 2050;
a.fill([]);
var b = [];
print(b.concat.apply('',a).length);
```
### Output
aborted(core dumped)
### Expected behavior
1
| Aborted(core dumped) | https://api.github.com/repos/jerryscript-project/jerryscript/issues/5060/comments | 0 | 2023-03-31T07:36:42Z | 2023-03-31T08:11:41Z | https://github.com/jerryscript-project/jerryscript/issues/5060 | 1,648,839,067 | 5,060 |
[
"jerryscript-project",
"jerryscript"
]
| ### JerryScript revision
2.4.0
### Build platform
ubuntu20.04
### Description
I found jerryscript can not output correctly like other js engines when I ran the following code. However when I set the length to 0xfff or 0xfffff, it can print.
### Test case
``` javascript
var a = ['a'];
var b = [];
b.length = 0xffff;
c = a.concat(b);
print(c.length);
```
### Output
### Expected behavior
65536
| A bug in concat() | https://api.github.com/repos/jerryscript-project/jerryscript/issues/5059/comments | 1 | 2023-03-29T06:10:10Z | 2023-07-12T13:10:11Z | https://github.com/jerryscript-project/jerryscript/issues/5059 | 1,645,099,788 | 5,059 |
[
"jerryscript-project",
"jerryscript"
]
| ###### JerryScript revision
1a2c04763aba49f52b1537acd3730098c873511c
###### Build platform
Ubuntu 20.04.2 LTS (Linux 5.15.0-67-generic x86_64)
###### Build steps
Describe how to build JerryScript. Give all the necessary details of the build
(e.g., environment variables, command(s), profile, command line options, etc.).
E.g.:
```sh
tools/build.py --compile-flag=-fsanitize=address --compile-flag=-g
```
###### Build log
###### Test case
```JavaScript
function i(a,b=eval()){eval()}
i(i("a"),eval("var a"))
```
###### Execution platform
same as the build platform.
###### Execution steps
```sh
build/bin/jerry testcase.js
```
###### Output
Segmentation fault (core dumped)
###### Backtrace
=================================================================
==167385==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000004 (pc 0x562a05bd8581 bp 0x7fffdc027800 sp 0x7fffdc027790 T0)
==167385==The signal is caused by a READ memory access.
==167385==Hint: address points to the zero page.
#0 0x562a05bd8580 (/data/jerryscript/asan/bin/jerry+0xd0580)
#1 0x562a05b8051c (/data/jerryscript/asan/bin/jerry+0x7851c)
#2 0x562a05b9069f (/data/jerryscript/asan/bin/jerry+0x8869f)
#3 0x562a05b919b9 (/data/jerryscript/asan/bin/jerry+0x899b9)
#4 0x562a05b6b6d8 (/data/jerryscript/asan/bin/jerry+0x636d8)
#5 0x562a05bc14cd (/data/jerryscript/asan/bin/jerry+0xb94cd)
#6 0x562a05bc696a (/data/jerryscript/asan/bin/jerry+0xbe96a)
#7 0x562a05b9085b (/data/jerryscript/asan/bin/jerry+0x8885b)
#8 0x562a05b919b9 (/data/jerryscript/asan/bin/jerry+0x899b9)
#9 0x562a05bf8576 (/data/jerryscript/asan/bin/jerry+0xf0576)
#10 0x562a05b25dac (/data/jerryscript/asan/bin/jerry+0x1ddac)
#11 0x7f32bb095082 in __libc_start_main ../csu/libc-start.c:308
#12 0x562a05b26cfd (/data/jerryscript/asan/bin/jerry+0x1ecfd)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV (/data/jerryscript/asan/bin/jerry+0xd0580)
==167385==ABORTING
###### Expected behavior
| Segmentation fault in jerry | https://api.github.com/repos/jerryscript-project/jerryscript/issues/5058/comments | 5 | 2023-03-28T06:12:27Z | 2023-04-26T19:22:43Z | https://github.com/jerryscript-project/jerryscript/issues/5058 | 1,643,268,712 | 5,058 |
[
"jerryscript-project",
"jerryscript"
]
| First of all, when reporting a bug, give the issue a descriptive title.
In the body of the issue, optionally give a free-form text description of the
bug. Give the context necessary for others to understand the problem.
Then, provide information necessary to reproduce the bug.
Omit sections that are irrelevant for the bug report, but note that information
like git revision, build platform, build command, and test case are required in
almost all cases.
###### JerryScript revision
1a2c04763aba49f52b1537acd3730098c873511c
###### Build platform
Ubuntu 20.04.2 LTS (Linux 5.15.0-67-generic x86_64)
###### Build steps
./tools/build.py
###### Test case
```
var p = new Promise(function(resolve,reject){})
var f = async(p) =>{}
await p;
f(p).then(function(){})
```
###### Execution platform
same as the build platform.
###### Execution steps
```sh
build/bin/jerry testcase.js
```
###### Output
Sometimes throws syntax errors: Unhandled exception: SyntaxError
Most of the time jerry crashes: Segmentation fault (core dumped)
###### Backtrace
###### Expected behavior
not to crash
| Segmentation fault in jerry | https://api.github.com/repos/jerryscript-project/jerryscript/issues/5057/comments | 1 | 2023-03-27T09:25:43Z | 2023-04-26T19:24:26Z | https://github.com/jerryscript-project/jerryscript/issues/5057 | 1,641,737,938 | 5,057 |
[
"jerryscript-project",
"jerryscript"
]
| ###### JerryScript revision
Commit: 1a2c0476[](1a2c04763aba49f52b1537acd3730098c873511c)
Version: v3.0.0
###### Build platform
Ubuntu 20.04.5 LTS (Linux 5.4.0-144-generic x86_64)
###### Build steps
```sh
python ./tools/build.py --clean --debug --compile-flag=-m32 --compile-flag=-fno-omit-frame-pointer --compile-flag=-fno-common --compile-flag=-fsanitize=address --compile-flag=-g --strip=off --lto=off --error-messages=on --system-allocator=on --logging=on --line-info=on --stack-limit=20
```
###### Test case
``` JavaScript
// poc1.js
class foo {static {}; static {};};
```
###### Execution steps & Output
```sh
$ ./jerryscript/build/bin/jerry poc1.js
ICE: Assertion 'info_type == SCANNER_TYPE_FUNCTION || info_type == SCANNER_TYPE_BLOCK' failed at jerryscript/jerry-core/parser/js/js-scanner-util.c(scanner_create_variables):2322.
Error: JERRY_FATAL_FAILED_ASSERTION
Aborted
```
---
###### Test case+
``` JavaScript
// poc2.js
class foo { static {}; };
```
###### Execution steps & Output+
```sh
$ ./jerryscript/build/bin/jerry poc2.js
ICE: Assertion 'context.status_flags & PARSER_SCANNING_SUCCESSFUL' failed at jerryscript/jerry-core/parser/js/js-parser.c(parser_parse_source):2288.
Error: JERRY_FATAL_FAILED_ASSERTION
Aborted
```
Credits:
@EJueon, @Ye0nny of the seclab-yonsei.
| Assertion 'info_type == SCANNER_TYPE_FUNCTION || info_type == SCANNER_TYPE_BLOCK' failed at jerryscript/jerry-core/parser/js/js-scanner-util.c(scanner_create_variables):2322. | https://api.github.com/repos/jerryscript-project/jerryscript/issues/5056/comments | 0 | 2023-03-26T13:44:00Z | 2023-03-26T15:16:58Z | https://github.com/jerryscript-project/jerryscript/issues/5056 | 1,640,917,217 | 5,056 |
[
"jerryscript-project",
"jerryscript"
]
| #### JerryScript revision
2.4.0
#### Build platform
ubuntu 20.04
#### Description
When I run the Test case , I find that jerryscript has no output. But if I set the loop number smaller than 174296, it can output correctly. Is it because that the number has reached to the maximum allowed String length in jerryscript? I wonder why the jerry outputs nothing.
#### Test case
var a = 'A';
var b = 'B';
for (var i = 0; i < 174296; i++) {
a = a + b;
}
print(a.length);
#### Output
#### Expected behavior
174297
| A problem in String length | https://api.github.com/repos/jerryscript-project/jerryscript/issues/5055/comments | 0 | 2023-03-25T13:15:55Z | 2023-03-29T13:11:35Z | https://github.com/jerryscript-project/jerryscript/issues/5055 | 1,640,513,961 | 5,055 |
[
"jerryscript-project",
"jerryscript"
]
| **Version:** `JerryScript 2.4.0`
**Description**:
When I run the following program, I have an interesting discovery that jerryscript can neither output "`right`" normally, just like hermes; At the same time, it will not report overflow errors like xs. I think it may have some problems.
**Test case**:
```public class Test {
a = [];
a.length = 0xfffff;
a.sort();
print("right");
```
**Output of jerryscript**:
```
```
**Output of hermes**:
```
right
```
**Output of xs**:
```
Error: stack overflow
```
| A problem about calling sort function with long array | https://api.github.com/repos/jerryscript-project/jerryscript/issues/5054/comments | 4 | 2023-03-16T02:14:24Z | 2023-03-24T15:20:48Z | https://github.com/jerryscript-project/jerryscript/issues/5054 | 1,626,568,009 | 5,054 |
[
"jerryscript-project",
"jerryscript"
]
| I am a researcher in software testing from the University of Stuttgart, Germany. We are testing grammar-based fuzzers and have chosen JerryScript as one of our fuzz targets for JavaScript. During our experiments we found 4 issues with JerryScript that I'd like to share with you.
Please excuse if some of the examples may look weird. This is typically the case when generating random test inputs. I verified crashes/issues by cross-checking the behavior with the JavaScript engines that Firefox or Chrome use. Thus, I am sometimes not entirely sure whether JerryScript or Firefox or Chrome misbehave.
All issues can be split into separate ones if required.
###### JerryScript revision
`3.0.0 - 1a2c04763aba49f52b1537acd3730098c873511c`
###### Build platform
`Rocky Linux release 9.1 (Blue Onyx), 5.14.0-162.18.1.el9_1.x86_64`
###### Build steps
```sh
python3 tools/build.py
```
###### Build logs
```
-- The C compiler identification is GNU 11.3.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- CMAKE_BUILD_TYPE MinSizeRel
-- CMAKE_C_COMPILER_ID GNU
-- CMAKE_SYSTEM_NAME Linux
-- CMAKE_SYSTEM_PROCESSOR x86_64
-- BUILD_SHARED_LIBS OFF
-- ENABLE_AMALGAM OFF
-- ENABLE_LTO ON
-- ENABLE_STRIP ON
-- ENABLE_COMPILE_COMMANDS ON
-- JERRY_VERSION 3.0.0
-- JERRY_CMDLINE ON
-- JERRY_CMDLINE_TEST OFF
-- JERRY_CMDLINE_SNAPSHOT OFF
-- JERRY_LIBFUZZER OFF (FORCED BY COMPILER)
-- JERRY_PORT ON (FORCED BY CMDLINE OR LIBFUZZER OR TESTS)
-- JERRY_EXT ON (FORCED BY CMDLINE OR TESTS)
-- JERRY_MATH OFF
-- UNITTESTS OFF
-- DOCTESTS OFF
-- JERRY_CPOINTER_32_BIT OFF
-- JERRY_DEBUGGER OFF
-- JERRY_ERROR_MESSAGES OFF
-- JERRY_EXTERNAL_CONTEXT OFF
-- JERRY_PARSER ON
-- JERRY_FUNCTION_TO_STRING OFF
-- JERRY_LINE_INFO OFF
-- JERRY_LOGGING OFF
-- JERRY_MEM_STATS OFF
-- JERRY_MEM_GC_BEFORE_EACH_ALLOC OFF
-- JERRY_PARSER_DUMP_BYTE_CODE OFF
-- JERRY_PROFILE es.next
-- JERRY_PROMISE_CALLBACK OFF
-- JERRY_REGEXP_STRICT_MODE OFF
-- JERRY_REGEXP_DUMP_BYTE_CODE OFF
-- JERRY_SNAPSHOT_EXEC OFF
-- JERRY_SNAPSHOT_SAVE OFF
-- JERRY_SYSTEM_ALLOCATOR OFF
-- JERRY_VALGRIND OFF
-- JERRY_VM_HALT OFF
-- JERRY_VM_THROW OFF
-- JERRY_GLOBAL_HEAP_SIZE (512)
-- JERRY_GC_LIMIT (0)
-- JERRY_STACK_LIMIT (0)
-- JERRY_GC_MARK_LIMIT (8)
-- Looking for sin in m
-- Looking for sin in m - found
-- FEATURE_INIT_FINI OFF
-- Performing Test HAVE_TM_GMTOFF
-- Performing Test HAVE_TM_GMTOFF - Success
-- ENABLE_LINK_MAP OFF
-- JERRY_TEST_STACK_MEASURE OFF
```
---
### Issue 1 - Arrays with self-references result in a core dump when printed
###### Test case
`test1.js`
```JavaScript
a = []
a[0] = 5 /* works */
a[1] = a /* fails! core dump */
```
###### Execution
`cat test1.js | ./build/bin/jerry`
###### Output
```
jerry>
jerry> 5
jerry> Aborted (core dumped)
```
###### Expected behavior
Should print the array as something like `[5, a]` without resulting in a core dump. I suppose that it is an issue with the (console) print function not handling already resolved references correctly? When executing without piping it to the binary it seems to work. Also executing `a = []; a[0] = 5; a[1] = a; a[2] = 4; print(a[1][2]);` works and prints `4`. I guess that once a reference in the print statement is resolved for an object, the print should not recurse again?
---
### Issue 2 - Editing the prototype of `this` by assigning a Proxy object leads to core dumps in some cases, while in other cases, it doesn't result in a core dump but should print an error
###### Test case
`test2.js`
```JavaScript
this.__proto__ = new Proxy(Number, this.__proto__); /* works, but shouldn't? */
Number.__proto__ = this.__proto__ = new Proxy(Number, this.__proto__); /* core dump */
```
###### Execution
`cat test2.js | ./build/bin/jerry`
###### Output
```
jerry> function () { [native code] }
jerry> Aborted (core dumped)
```
###### Expected behavior
I assume that both statements should result in similar messages like for example in Firefox `Uncaught TypeError: can't set prototype of this object` or Chrome `Uncaught TypeError: Immutable prototype object '#<Window>' cannot have their prototype set`. However, I am not aware whether it has to do something with the fact that `this` is something different in the browsers but not in JerryScript.
---
### Issue 3 - Editing the prototype of objects like `Number` or `Array` by assigning a Proxy leads to a segmentation fault (core dump)
###### Test case
`test3.js`
```JavaScript
Number.__proto__ = new Proxy(Number, {})
```
###### Execution
`cat test3.js | ./build/bin/jerry`
###### Output
```
Segmentation fault (core dumped)
```
###### Expected behavior
Should print something like `Proxy { <target>: Number(), <handler>: {} }`. I suppose this is similar to issue 1 with resolving recursive references?
---
### Issue 4 - Chained assignments cause in some cases core dumps while working as expected when executed on their own
###### Test case
`test4.js`
```JavaScript
{}.__proto__[20] = new Array(1000.00) /* works, syntax error */
myvar = {}.__proto__[20] /* works, undefined */
myvar = {}.__proto__[20] = new Array(1000.00) /* core dump */
```
###### Execution
`cat test4.js | ./build/bin/jerry`
###### Output
```
jerry> Unhandled exception: SyntaxError
jerry> undefined
jerry> Aborted (core dumped)
```
###### Expected behavior
This should result in printing an empty array with 1000 slots (similar to `new Array(1000.00)` which works just fine). Although this also only happens when the console print is executed, I think `myvar` actually does not get the correct value assigned, i.e. `new Array(1000.00)`. However, I am not sure whether ignoring a sub-expression that results in an syntax error should be treated as "non-existent" or whether the whole statement should be discarded in a syntax error. | Four issues found through grammar-based fuzzing | https://api.github.com/repos/jerryscript-project/jerryscript/issues/5053/comments | 0 | 2023-03-15T11:55:52Z | 2023-03-15T16:04:44Z | https://github.com/jerryscript-project/jerryscript/issues/5053 | 1,625,379,939 | 5,053 |
[
"jerryscript-project",
"jerryscript"
]
| ###### JerryScript revision
1a2c04763aba49f52b1537acd3730098c873511c
###### Build platform
Name the build platform. E.g., copy the output of
Ubuntu Lunar Lobster (development branch) (Linux 5.15.0-67-generic x86_64)
###### Build steps
```sh
python3 tools/build.py --builddir=asan --compile-flag=-fno-omit-frame-pointer --compile-flag=-fsanitize=address --compile-flag=-fno-optimize-sibling-calls --compile-flag=-g --strip=OFF
```
###### Test case
```javascript
function f0(a1, a2, ...a3) {
class C4 extends a1 {
}
var v5 = new C4(C4);
return C4;
}
f0(f0);
```
###### Execution steps
```
./build/bin/jerry test.js
```
###### Output
segmentfault
###### Backtrace
==51694==ERROR: AddressSanitizer: stack-overflow on address 0x7ffe6695efc0 (pc 0x5556250c8272 bp 0x7ffe6695f070 sp 0x7ffe6695efb0 T0)
#0 0x5556250c8272 in ecma_op_function_construct /home/zxw/jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1704
#1 0x5556250c8958 in ecma_op_function_construct_constructor /home/zxw/jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1631
#2 0x5556250c8958 in ecma_op_function_construct /home/zxw/jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1727
#3 0x5556250c8958 in ecma_op_function_construct_constructor /home/zxw/jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1631
...
...
#491 0x5556250c8958 in ecma_op_function_construct_constructor /home/zxw/jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1631
#492 0x5556250c8958 in ecma_op_function_construct /home/zxw/jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1727
#493 0x5556250c8958 in ecma_op_function_construct_constructor /home/zxw/jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1631
#494 0x5556250c8958 in ecma_op_function_construct /home/zxw/jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1727
#495 0x5556250c8958 in ecma_op_function_construct_constructor /home/zxw/jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1631
#496 0x5556250c8958 in ecma_op_function_construct /home/zxw/jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1727
SUMMARY: AddressSanitizer: stack-overflow /home/zxw/jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1704 in ecma_op_function_construct
==51694==ABORTING
| jerry crashed while running the following code. | https://api.github.com/repos/jerryscript-project/jerryscript/issues/5052/comments | 1 | 2023-03-15T06:57:23Z | 2023-04-26T19:26:13Z | https://github.com/jerryscript-project/jerryscript/issues/5052 | 1,624,874,619 | 5,052 |
[
"jerryscript-project",
"jerryscript"
]
|
the following js cause a segmentation fault in jerryscript.
```
function test(){
function f(){
var f = test();
h = f();
}
return f;
}
let a = test();
c = a();
``` | segmentation fault in jerryscript | https://api.github.com/repos/jerryscript-project/jerryscript/issues/5051/comments | 2 | 2023-03-14T03:36:48Z | 2023-04-26T19:28:39Z | https://github.com/jerryscript-project/jerryscript/issues/5051 | 1,622,665,090 | 5,051 |
[
"jerryscript-project",
"jerryscript"
]
| ###### JerryScript revision
1a2c04763aba49f52b1537acd3730098c873511c
###### Build platform
Ubuntu 16.04.7 LTS (Linux 4.15.0-142-generic x86_64)
###### Bug
When building with JERRY_BUILTIN_WEAKREF 0 and JERRY_BUILTIN_CONTAINER 1, the project doesn't compile:
```
jerryscript/jerry-core/ecma/base/ecma-gc.c:1620:44: error: 'ECMA_OBJECT_CLASS_WEAKREF' undeclared (first use in this function)
```
When building with JERRY_BUILTIN_REALMS 0, the project doesn't compile:
```
In file included from jerryscript/jerry-core/include/jerryscript-types.h:23,
from jerryscript/jerry-core/include/jerryscript-core.h:19,
from jerryscript/jerry-core/jrt/jrt.h:22,
from jerryscript/jerry-core/lit/lit-globals.h:19,
from jerryscript/jerry-core/ecma/base/ecma-errors.h:19,
from jerryscript/jerry-core/ecma/base/ecma-globals.h:19,
from jerryscript/jerry-core/vm/opcodes.h:19,
from jerryscript/jerry-core/vm/opcodes.c:16:
jerryscript/jerry-core/vm/opcodes.c: In function 'opfunc_lexical_scope_has_restricted_binding':
jerryscript/jerry-core/vm/opcodes.c:2252:43: warning: comparison between pointer and integer
JERRY_ASSERT (frame_ctx_p->this_binding == ecma_builtin_get_global ());
^~
jerryscript/jerry-core/include/jerryscript-compiler.h:57:48: note: in definition of macro 'JERRY_UNLIKELY'
#define JERRY_UNLIKELY(x) __builtin_expect (!!(x), 0)
^
jerryscript/jerry-core/vm/opcodes.c:2252:3: note: in expansion of macro 'JERRY_ASSERT'
JERRY_ASSERT (frame_ctx_p->this_binding == ecma_builtin_get_global ());
^~~~~~~~~~~~
jerryscript/jerry-core/vm/opcodes.c:2266:64: error: 'global_obj_p' undeclared (first use in this function); did you mean 'global_scope_p'?
ecma_object_t *const global_scope_p = ecma_get_global_scope (global_obj_p);
^~~~~~~~~~~~
global_scope_p
```
| build error with certain config options | https://api.github.com/repos/jerryscript-project/jerryscript/issues/5050/comments | 0 | 2023-03-11T09:47:31Z | 2023-03-11T11:22:57Z | https://github.com/jerryscript-project/jerryscript/issues/5050 | 1,619,950,076 | 5,050 |
[
"jerryscript-project",
"jerryscript"
]
| I'm building JerryScript attempting to directly run it on STM32F767, so I clone the project and then execute the command
```sh
python2 tools/build.py --toolchain=cmake/toolchain_mcu_stm32f7.cmake
```
Then I got an error. Log will be put under the description.
The first problem seems to be VFP problem, which can be solved by changing the content of toolchain_mcu_stm32f7.cmake from "-mfloat-abi=hard" to "-mfloat-abi=softfp". But does this affect the performance of JerryScript?
The second problem seems to be a link problem. I'm really not good at this, could anyone tell me the solution?
###### Build platform
Ubuntu 20.04.2 LTS (Linux 5.15.0-60-generic x86_64)
arm-none-eabi-gcc (15:9-2019-q4-0ubuntu1) 9.2.1 20191025 (release) [ARM/arm-9-branch revision 277599]
cmake version 3.24.2
Python 2.7.18
###### Build steps
```sh
cd jerryscript
python2 tools/build.py --toolchain=cmake/toolchain_mcu_stm32f7.cmake
```
###### Build log
```sh
-- The C compiler identification is GNU 9.2.1
System is unknown to cmake, create:
Platform/MCU to use this system, please post your config file on discourse.cmake.org so it can be added to cmake
-- Detecting C compiler ABI info
System is unknown to cmake, create:
Platform/MCU to use this system, please post your config file on discourse.cmake.org so it can be added to cmake
-- Detecting C compiler ABI info - failed
-- Detecting C compile features
-- Detecting C compile features - done
-- CMAKE_BUILD_TYPE MinSizeRel
-- CMAKE_C_COMPILER_ID GNU
-- CMAKE_SYSTEM_NAME MCU
-- CMAKE_SYSTEM_PROCESSOR armv7l
-- BUILD_SHARED_LIBS OFF
-- ENABLE_AMALGAM OFF
-- ENABLE_LTO ON
-- ENABLE_STRIP ON
-- ENABLE_COMPILE_COMMANDS ON
-- JERRY_VERSION
-- JERRY_CMDLINE ON
-- JERRY_CMDLINE_TEST OFF
-- JERRY_CMDLINE_SNAPSHOT OFF
-- JERRY_LIBFUZZER OFF (FORCED BY COMPILER)
-- JERRY_PORT ON (FORCED BY CMDLINE OR LIBFUZZER OR TESTS)
-- JERRY_EXT ON (FORCED BY CMDLINE OR TESTS)
-- JERRY_MATH OFF
-- UNITTESTS OFF
-- DOCTESTS OFF
-- JERRY_CPOINTER_32_BIT OFF
-- JERRY_DEBUGGER OFF
-- JERRY_ERROR_MESSAGES OFF
-- JERRY_EXTERNAL_CONTEXT OFF
-- JERRY_PARSER ON
-- JERRY_FUNCTION_TO_STRING OFF
-- JERRY_LINE_INFO OFF
-- JERRY_LOGGING OFF
-- JERRY_MEM_STATS OFF
-- JERRY_MEM_GC_BEFORE_EACH_ALLOC OFF
-- JERRY_PARSER_DUMP_BYTE_CODE OFF
-- JERRY_PROFILE es.next
-- JERRY_PROMISE_CALLBACK OFF
-- JERRY_REGEXP_STRICT_MODE OFF
-- JERRY_REGEXP_DUMP_BYTE_CODE OFF
-- JERRY_SNAPSHOT_EXEC OFF
-- JERRY_SNAPSHOT_SAVE OFF
-- JERRY_SYSTEM_ALLOCATOR OFF
-- JERRY_VALGRIND OFF
-- JERRY_VM_HALT OFF
-- JERRY_VM_THROW OFF
-- JERRY_GLOBAL_HEAP_SIZE (512)
-- JERRY_GC_LIMIT (0)
-- JERRY_STACK_LIMIT (0)
-- JERRY_GC_MARK_LIMIT (8)
-- Looking for sin in m
System is unknown to cmake, create:
Platform/MCU to use this system, please post your config file on discourse.cmake.org so it can be added to cmake
-- Looking for sin in m - not found
-- FEATURE_INIT_FINI OFF
-- Performing Test HAVE_TM_GMTOFF
System is unknown to cmake, create:
Platform/MCU to use this system, please post your config file on discourse.cmake.org so it can be added to cmake
-- Performing Test HAVE_TM_GMTOFF - Failed
-- ENABLE_LINK_MAP OFF
-- JERRY_TEST_STACK_MEASURE OFF
-- Configuring done
-- Generating done
-- Build files have been written to: /home/leo/Desktop/JerryScript/jerryscript/build
[ 0%] Built target amalgam
[ 0%] Building C object jerry-port/CMakeFiles/jerry-port.dir/common/jerry-port-context.c.obj
[ 1%] Building C object jerry-port/CMakeFiles/jerry-port.dir/common/jerry-port-fs.c.obj
[ 2%] Building C object jerry-port/CMakeFiles/jerry-port.dir/common/jerry-port-process.c.obj
……
[ 99%] Built target jerry-ext
[ 99%] Building C object jerry-main/CMakeFiles/jerry.dir/main-desktop.c.obj
[ 99%] Building C object jerry-main/CMakeFiles/jerry.dir/arguments/options.c.obj
[100%] Building C object jerry-main/CMakeFiles/jerry.dir/arguments/cli.c.obj
[100%] Linking C executable ../bin/jerry
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: error: /tmp/jerry.PosijZ.ltrans0.ltrans.o uses VFP register arguments, ../bin/jerry does not
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: failed to merge target specific data of file /tmp/jerry.PosijZ.ltrans0.ltrans.o
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: error: /tmp/jerry.PosijZ.ltrans1.ltrans.o uses VFP register arguments, ../bin/jerry does not
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: failed to merge target specific data of file /tmp/jerry.PosijZ.ltrans1.ltrans.o
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: error: /tmp/jerry.PosijZ.ltrans2.ltrans.o uses VFP register arguments, ../bin/jerry does not
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: failed to merge target specific data of file /tmp/jerry.PosijZ.ltrans2.ltrans.o
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: error: /tmp/jerry.PosijZ.ltrans3.ltrans.o uses VFP register arguments, ../bin/jerry does not
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: failed to merge target specific data of file /tmp/jerry.PosijZ.ltrans3.ltrans.o
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: error: /tmp/jerry.PosijZ.ltrans4.ltrans.o uses VFP register arguments, ../bin/jerry does not
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: failed to merge target specific data of file /tmp/jerry.PosijZ.ltrans4.ltrans.o
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: error: /tmp/jerry.PosijZ.ltrans5.ltrans.o uses VFP register arguments, ../bin/jerry does not
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: failed to merge target specific data of file /tmp/jerry.PosijZ.ltrans5.ltrans.o
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: error: /tmp/jerry.PosijZ.ltrans6.ltrans.o uses VFP register arguments, ../bin/jerry does not
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: failed to merge target specific data of file /tmp/jerry.PosijZ.ltrans6.ltrans.o
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: error: /tmp/jerry.PosijZ.ltrans7.ltrans.o uses VFP register arguments, ../bin/jerry does not
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: failed to merge target specific data of file /tmp/jerry.PosijZ.ltrans7.ltrans.o
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: error: /tmp/jerry.PosijZ.ltrans8.ltrans.o uses VFP register arguments, ../bin/jerry does not
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: failed to merge target specific data of file /tmp/jerry.PosijZ.ltrans8.ltrans.o
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: error: /tmp/jerry.PosijZ.ltrans9.ltrans.o uses VFP register arguments, ../bin/jerry does not
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: failed to merge target specific data of file /tmp/jerry.PosijZ.ltrans9.ltrans.o
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: /tmp/jerry.PosijZ.ltrans2.ltrans.o: in function `ecma_builtin_number_prototype_object_to_string':
<artificial>:(.text+0x3bac): undefined reference to `nextafter'
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: /tmp/jerry.PosijZ.ltrans2.ltrans.o: in function `ecma_builtin_number_prototype_dispatch_routine':
<artificial>:(.text+0x3f88): undefined reference to `nextafter'
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: <artificial>:(.text+0x3fa6): undefined reference to `nextafter'
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: <artificial>:(.text+0x3fd6): undefined reference to `nextafter'
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: /tmp/jerry.PosijZ.ltrans2.ltrans.o: in function `ecma_builtin_math_dispatch_routine':
<artificial>:(.text+0x4596): undefined reference to `acos'
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: <artificial>:(.text+0x45ac): undefined reference to `asin'
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: <artificial>:(.text+0x45b6): undefined reference to `atan'
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: <artificial>:(.text+0x45ca): undefined reference to `cos'
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: <artificial>:(.text+0x45d4): undefined reference to `exp'
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: <artificial>:(.text+0x45e8): undefined reference to `log'
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: <artificial>:(.text+0x465e): undefined reference to `fmod'
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: <artificial>:(.text+0x46ea): undefined reference to `fmod'
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: <artificial>:(.text+0x476c): undefined reference to `sin'
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: <artificial>:(.text+0x4776): undefined reference to `sqrt'
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: <artificial>:(.text+0x4780): undefined reference to `tan'
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: <artificial>:(.text+0x478e): undefined reference to `atan2'
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: <artificial>:(.text+0x47a6): undefined reference to `acosh'
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: <artificial>:(.text+0x47b0): undefined reference to `asinh'
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: <artificial>:(.text+0x47ba): undefined reference to `atanh'
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: <artificial>:(.text+0x47c4): undefined reference to `cbrt'
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: <artificial>:(.text+0x47ce): undefined reference to `cosh'
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: <artificial>:(.text+0x47d8): undefined reference to `expm1'
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: <artificial>:(.text+0x47e2): undefined reference to `log1p'
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: <artificial>:(.text+0x47ec): undefined reference to `log10'
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: <artificial>:(.text+0x4814): undefined reference to `log'
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: <artificial>:(.text+0x4826): undefined reference to `sinh'
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: <artificial>:(.text+0x4830): undefined reference to `tanh'
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: <artificial>:(.text+0x4974): undefined reference to `sqrt'
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: /tmp/jerry.PosijZ.ltrans3.ltrans.o: in function `ecma_date_to_string_format':
<artificial>:(.text+0x6e2): undefined reference to `jerry_port_local_tza'
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: <artificial>:(.text+0x77c): undefined reference to `jerry_port_local_tza'
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: /tmp/jerry.PosijZ.ltrans3.ltrans.o: in function `ecma_date_make_day':
<artificial>:(.text+0x95e): undefined reference to `fmod'
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: /tmp/jerry.PosijZ.ltrans3.ltrans.o: in function `ecma_builtin_date_parse':
<artificial>:(.text+0xc10): undefined reference to `jerry_port_local_tza'
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: /tmp/jerry.PosijZ.ltrans3.ltrans.o: in function `ecma_builtin_date_now_helper':
<artificial>:(.text+0x1a0a): undefined reference to `jerry_port_current_time'
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: /tmp/jerry.PosijZ.ltrans3.ltrans.o: in function `ecma_builtin_date_dispatch_construct':
<artificial>:(.text+0x1b30): undefined reference to `jerry_port_local_tza'
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: /tmp/jerry.PosijZ.ltrans3.ltrans.o: in function `ecma_builtin_date_dispatch_call':
<artificial>:(.text+0x1b54): undefined reference to `jerry_port_local_tza'
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: /tmp/jerry.PosijZ.ltrans3.ltrans.o: in function `ecma_builtin_date_prototype_dispatch_routine':
<artificial>:(.text+0x1cfc): undefined reference to `jerry_port_local_tza'
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: <artificial>:(.text+0x1de4): undefined reference to `jerry_port_local_tza'
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: <artificial>:(.text+0x1f10): undefined reference to `jerry_port_local_tza'
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: /tmp/jerry.PosijZ.ltrans3.ltrans.o:<artificial>:(.text+0x1fc8): more undefined references to `jerry_port_local_tza' follow
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: /tmp/jerry.PosijZ.ltrans8.ltrans.o: in function `ecma_typedarray_helper_dispatch_construct':
<artificial>:(.text+0x160c): undefined reference to `fmod'
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: /tmp/jerry.PosijZ.ltrans8.ltrans.o: in function `ecma_new_ecma_string_from_number':
<artificial>:(.text+0x4a46): undefined reference to `nextafter'
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: <artificial>:(.text+0x4a64): undefined reference to `nextafter'
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: <artificial>:(.text+0x4a98): undefined reference to `nextafter'
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: /tmp/jerry.PosijZ.ltrans9.ltrans.o: in function `ecma_number_pow':
<artificial>:(.text+0x634): undefined reference to `pow'
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: /tmp/jerry.PosijZ.ltrans9.ltrans.o: in function `main':
<artificial>:(.text.startup+0x1a): undefined reference to `jerry_port_current_time'
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: /tmp/jerry.PosijZ.ltrans6.ltrans.o: in function `ecma_typedarray_setter_number_to_uint32':
<artificial>:(.text+0x558): undefined reference to `fmod'
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/lib/libc.a(lib_a-exit.o): in function `exit':
/build/newlib-CVVEyx/newlib-3.3.0/build/arm-none-eabi/newlib/libc/stdlib/../../../../../newlib/libc/stdlib/exit.c:64: undefined reference to `_exit'
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/lib/libc.a(lib_a-fstatr.o): in function `_fstat_r':
/build/newlib-CVVEyx/newlib-3.3.0/build/arm-none-eabi/newlib/libc/reent/../../../../../newlib/libc/reent/fstatr.c:55: undefined reference to `_fstat'
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/lib/libc.a(lib_a-openr.o): in function `_open_r':
/build/newlib-CVVEyx/newlib-3.3.0/build/arm-none-eabi/newlib/libc/reent/../../../../../newlib/libc/reent/openr.c:50: undefined reference to `_open'
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/lib/libc.a(lib_a-sbrkr.o): in function `_sbrk_r':
/build/newlib-CVVEyx/newlib-3.3.0/build/arm-none-eabi/newlib/libc/reent/../../../../../newlib/libc/reent/sbrkr.c:51: undefined reference to `_sbrk'
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/lib/libc.a(lib_a-writer.o): in function `_write_r':
/build/newlib-CVVEyx/newlib-3.3.0/build/arm-none-eabi/newlib/libc/reent/../../../../../newlib/libc/reent/writer.c:49: undefined reference to `_write'
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/lib/libc.a(lib_a-closer.o): in function `_close_r':
/build/newlib-CVVEyx/newlib-3.3.0/build/arm-none-eabi/newlib/libc/reent/../../../../../newlib/libc/reent/closer.c:47: undefined reference to `_close'
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/lib/libc.a(lib_a-isattyr.o): in function `_isatty_r':
/build/newlib-CVVEyx/newlib-3.3.0/build/arm-none-eabi/newlib/libc/reent/../../../../../newlib/libc/reent/isattyr.c:52: undefined reference to `_isatty'
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/lib/libc.a(lib_a-lseekr.o): in function `_lseek_r':
/build/newlib-CVVEyx/newlib-3.3.0/build/arm-none-eabi/newlib/libc/reent/../../../../../newlib/libc/reent/lseekr.c:49: undefined reference to `_lseek'
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/lib/libc.a(lib_a-readr.o): in function `_read_r':
/build/newlib-CVVEyx/newlib-3.3.0/build/arm-none-eabi/newlib/libc/reent/../../../../../newlib/libc/reent/readr.c:49: undefined reference to `_read'
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/lib/libc.a(lib_a-abort.o): in function `abort':
/build/newlib-CVVEyx/newlib-3.3.0/build/arm-none-eabi/newlib/libc/stdlib/../../../../../newlib/libc/stdlib/abort.c:59: undefined reference to `_exit'
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/lib/libc.a(lib_a-signalr.o): in function `_kill_r':
/build/newlib-CVVEyx/newlib-3.3.0/build/arm-none-eabi/newlib/libc/reent/../../../../../newlib/libc/reent/signalr.c:53: undefined reference to `_kill'
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/lib/libc.a(lib_a-signalr.o): in function `_getpid_r':
/build/newlib-CVVEyx/newlib-3.3.0/build/arm-none-eabi/newlib/libc/reent/../../../../../newlib/libc/reent/signalr.c:83: undefined reference to `_getpid'
collect2: error: ld returned 1 exit status
make[2]: *** [jerry-main/CMakeFiles/jerry.dir/build.make:133: bin/jerry] Error 1
make[1]: *** [CMakeFiles/Makefile2:259: jerry-main/CMakeFiles/jerry.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
==============================
Build failed with exit code: 2
==============================
```
| build error when using --toolchain=cmake/toolchain_mcu_stm32f7.cmake | https://api.github.com/repos/jerryscript-project/jerryscript/issues/5046/comments | 1 | 2023-03-08T10:44:31Z | 2023-05-26T14:42:46Z | https://github.com/jerryscript-project/jerryscript/issues/5046 | 1,615,057,679 | 5,046 |
[
"jerryscript-project",
"jerryscript"
]
| ###### JerryScript revision
1a2c04763aba49f52b1537acd3730098c873511c
###### Build platform
`Kali GNU/Linux Rolling - Linux 5.16.0-kali7-amd64 x86_64`
###### Build steps
`tools/build.py --clean --debug --fsanitize=address`
###### Test case
```javascript
var v0 = async (a1, a2, a3) => {
var v5 = async (a6, a7, a8) => {
return "AAAAAAA";
};
var v9 = v5(v0, v0, v0);
var v12 = /Q*/gi;
String.fromCharCode(v0, v0).replace(v12, v0);
};
v0();
```
###### Output
`854467==ERROR: AddressSanitizer: stack-overflow on address 0x7fffbe957ff8 (pc 0x5568e58f4e87 bp 0x5568e59c5280 sp 0x7fffbe958000 T0)`
`#0 0x5568e58f4e87 (/home/kali/jerryscript/build/bin/jerry+0x48e87)`
`#1 0x5568e5985bc9 (/home/kali/jerryscript/build/bin/jerry+0xd9bc9)`
`#2 0x5568e5934252 (/home/kali/jerryscript/build/bin/jerry+0x88252)`
`#3 0x5568e5943e3e (/home/kali/jerryscript/build/bin/jerry+0x97e3e)`
`[...]`
`[#4] 0x55555575b661 → jerry_port_fatal(code=JERRY_FATAL_REF_COUNT_LIMIT)`
`[#5] 0x5555556677d3 → jerry_fatal(code=JERRY_FATAL_REF_COUNT_LIMIT)`
`[#6] 0x5555555ceab7 → ecma_ref_object_inline(object_p=0x55555582ef28 <jerry_global_heap+680>)`
`[#7] 0x5555555ee9e0 → ecma_copy_value(value=0x2ab)`
`[#8] 0x5555555eea6f → ecma_fast_copy_value(value=0x2ab)`
`[#9] 0x5555556d1711 → vm_init_exec(frame_ctx_p=0x7fffff934460)`
| Stack-Consumption Security Issue (ecma_ref_object_inline) | https://api.github.com/repos/jerryscript-project/jerryscript/issues/5045/comments | 0 | 2023-03-03T11:12:48Z | 2023-03-03T20:08:02Z | https://github.com/jerryscript-project/jerryscript/issues/5045 | 1,608,441,146 | 5,045 |
[
"jerryscript-project",
"jerryscript"
]
| First of all, when reporting a bug, give the issue a descriptive title.
In the body of the issue, optionally give a free-form text description of the
bug. Give the context necessary for others to understand the problem.
Then, provide information necessary to reproduce the bug.
Omit sections that are irrelevant for the bug report, but note that information
like git revision, build platform, build command, and test case are required in
almost all cases.
###### JerryScript revision
Identify the git hash(es) or tag(s) where the issue was observed.
###### Build platform
Name the build platform. E.g., copy the output of
`echo "$(lsb_release -ds) ($(uname -mrs))"` (on Linux),
`echo "$(sw_vers -productName) $(sw_vers -productVersion) ($(uname -mrs))"` (on macOS), or
`python -c "import platform; print(platform.platform())"` (should work everywhere).
###### Build steps
Describe how to build JerryScript. Give all the necessary details of the build
(e.g., environment variables, command(s), profile, command line options, etc.).
E.g.:
```sh
tools/build.py --clean --debug
```
Or:
```sh
mkdir build && cmake -H. -Bbuild && make -C build
```
Even if the bug was originally observed when JerryScript was integrated into a
larger project, try to reproduce it with as few external code as possible,
preferably by building the `jerry` command line tool.
###### Build log
Copy the build log if the reported issue is a build problem. Do a verbose build
if necessary. Try and trim the log to relevant parts.
###### Test case
Give the JavaScript input that should be passed to the engine to trigger the
bug. Try and post a reduced test case that is minimally necessary to reproduce
the issue. As a rule of thumb, use Markdown's fenced code block syntax for the
test case. Attach the file (renamed to .txt) if the test case contains
'problematic' bytes that cannot be copied in the bug report directly.
###### Execution platform
Unnecessary if the same as the build platform.
###### Execution steps
List the steps that trigger the bug.
E.g., if a bug is snapshot-specific:
```sh
build/bin/jerry-snapshot generate -o testcase.js.snapshot testcase.js
build/bin/jerry --exec-snapshot testcase.js.snapshot
```
Unnecessary if trivial (i.e., `build/bin/jerry testcase.js`).
###### Output
Copy relevant output from the standard output and/or error channels.
###### Backtrace
In case of a crash (assertion failure, etc.), try to copy the backtrace from a
debugger at the point of failure.
###### Expected behavior
Describe what should happen instead of current behavior. Unnecessary if trivial
(e.g., in case of a crash, the trivial expected behavior is not to crash).
| Stack- | https://api.github.com/repos/jerryscript-project/jerryscript/issues/5044/comments | 0 | 2023-03-03T11:11:52Z | 2023-03-03T12:55:59Z | https://github.com/jerryscript-project/jerryscript/issues/5044 | 1,608,440,004 | 5,044 |
[
"jerryscript-project",
"jerryscript"
]
| Do you have any plans for a new version? | Do you have any plans for a new version? | https://api.github.com/repos/jerryscript-project/jerryscript/issues/5043/comments | 0 | 2023-02-28T03:28:39Z | 2023-02-28T03:28:39Z | https://github.com/jerryscript-project/jerryscript/issues/5043 | 1,602,307,430 | 5,043 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.