==2342==ERROR: AddressSanitizer: heap-buffer-overflow on address 0xf580073b at pc 0x080f1a7a bp 0xffbb2b48 sp 0xffbb2b38
WRITE of size 1 at 0xf580073b thread T0
#0 0x80f1a79 in lit_char_to_utf8_bytes jerry-core/lit/lit-char-helpers.c:377
#1 0x811f6d8 in ecma_new_ecma_string_from_utf8_converted_to_cesu8 jerry-core/ecma/base/ecma-helpers-string.c:376
#2 0x811f6d8 in lexer_construct_regexp_object jerry-core/parser/js/js-lexer.c:2175
#3 0x817e286 in parser_parse_unary_expression jerry-core/parser/js/js-parser-expr.c:1116
#4 0x817e286 in parser_parse_expression jerry-core/parser/js/js-parser-expr.c:1858
#5 0x8193a71 in parser_parse_statements jerry-core/parser/js/js-parser-statm.c:2030
#6 0x80effc7 in parser_parse_source.lto_priv.160 jerry-core/parser/js/js-parser.c:2368
#7 0x804d1ef in parser_parse_script jerry-core/parser/js/js-parser.c:2881
#8 0x804d1ef in ecma_op_eval_chars_bufferjerry-core/ecma/operations/ecma-eval.c:101
#9 0x804d1ef in jerry_eval jerry-core/api/jerry.c:551
#10 0x804d1ef in main jerry-main/main-unix.c:814
#11 0xf702e636 in __libc_start_main (/lib32/libc.so.6+0x18636)
#12 0x804f1eb (build/bin/jerry+0x804f1eb)
The text was updated successfully, but these errors were encountered:
rerobika
pushed a commit
to rerobika/jerryscript
that referenced
this issue
Aug 20, 2018
This patch checks whether the source code is a valid UTF-8 string before evaluating it in prompt mode.
Also fixesjerryscript-project#2476.
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
This patch checks whether the source code is a valid UTF-8 string before evaluating it in prompt mode.
Also fixes#2476.
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
Version:
4e58ccf
Build command:
python3 ./tools/build.py --clean --jerry-libc=off --system-allocator=on --profile=es2015-subset --compile-flag=-m32 --compile-flag=-fsanitize=address --strip=OFFTestcase:
cat testcase | ./jerryWhere testcase is as following:
(
300a 2ff0 2f0ain hex).Stack trace:
The text was updated successfully, but these errors were encountered: