Skip to content

Assertion (flags >> CBC_STACK_ADJUST_SHIFT) >= CBC_STACK_ADJUST_BASE || (CBC_STACK_ADJUST_BASE - (flags >> CBC_STACK_ADJUST_SHIFT)) <= context_p->stack_depth in parser_flush_cbc #3815

@renatahodovan

Description

@renatahodovan
JerryScript revision

3b4c259

Build platform

Linux-4.15.0-88-generic-x86_64-with-Ubuntu-18.04-bionic

Build steps
./tools/build.py --clean --debug --compile-flag=-fsanitize=address \
--compile-flag=-m32 --compile-flag=-fno-omit-frame-pointer \
--compile-flag=-fno-common --compile-flag=-g \
--strip=off --system-allocator=on --logging=on \
--linker-flag=-fuse-ld=gold --error-messages=on --profile=es2015-subset --stack-limit=32
Test case
($( )) = $
Output
ICE: Assertion '(flags >> CBC_STACK_ADJUST_SHIFT) >= CBC_STACK_ADJUST_BASE || (CBC_STACK_ADJUST_BASE - (flags >> CBC_STACK_ADJUST_SHIFT)) <= context_p->stack_depth' failed at jerryscript/jerry-core/parser/js/js-parser-util.c(parser_flush_cbc):181.
Error: ERR_FAILED_INTERNAL_ASSERTION
ASAN:DEADLYSIGNAL
=================================================================
==24536==ERROR: AddressSanitizer: ABRT on unknown address 0x00005fd8 (pc 0xf7fa9079 bp 0xffe9224c sp 0xffe92230 T0)
    #0 0xf7fa9078  (linux-gate.so.1+0x1078)
    #1 0xf7fa9078  (linux-gate.so.1+0x1078)
    #2 0xf77d0831 in raise (/lib/i386-linux-gnu/libc.so.6+0x2d831)
    #3 0xf77d1cc0 in abort (/lib/i386-linux-gnu/libc.so.6+0x2ecc0)
    #4 0x565f736b in jerry_port_fatal jerryscript/jerry-port/default/default-fatal.c:30
    #5 0x566aeb8d in jerry_fatal jerryscript/jerry-core/jrt/jrt-fatals.c:63
    #6 0x566aebce in jerry_assert_fail jerryscript/jerry-core/jrt/jrt-fatals.c:87
    #7 0x565eb716 in parser_flush_cbc jerryscript/jerry-core/parser/js/js-parser-util.c:180
    #8 0x56616295 in parser_parse_block_expression jerryscript/jerry-core/parser/js/js-parser-expr.c:3431
    #9 0x5662ad91 in parser_parse_statements jerryscript/jerry-core/parser/js/js-parser-statm.c:3154
    #10 0x566bdd2f in parser_parse_source jerryscript/jerry-core/parser/js/js-parser.c:2177
    #11 0x566c1b17 in parser_parse_script jerryscript/jerry-core/parser/js/js-parser.c:2808
    #12 0x5671570e in jerry_parse jerryscript/jerry-core/api/jerry.c:447
    #13 0x5671233e in main jerryscript/jerry-main/main-unix.c:750
    #14 0xf77bbe80 in __libc_start_main (/lib/i386-linux-gnu/libc.so.6+0x18e80)
    #15 0x565ea1e0  (jerryscript/build_gcc_asan_es2015/bin/jerry+0x1a1e0)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: ABRT (linux-gate.so.1+0x1078) 
==24536==ABORTING

Found by Fuzzinator with grammarinator.

Metadata

Metadata

Assignees

Labels

bugUndesired behaviour

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions