Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assertion JERRY_CONTEXT (jmem_heap_allocated_size) == 0 in jmem_heap_finalize #3297

Closed
renatahodovan opened this issue Nov 11, 2019 · 0 comments · Fixed by #3301
Closed

Assertion JERRY_CONTEXT (jmem_heap_allocated_size) == 0 in jmem_heap_finalize #3297

renatahodovan opened this issue Nov 11, 2019 · 0 comments · Fixed by #3301
Labels
bug Undesired behaviour ES2015 Related to ES2015 features

Comments

@renatahodovan
Copy link
Contributor

JerryScript revision

452c781

Build platform

Linux-4.15.0-62-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
Test case
"98765".replace(76, function ( ) { return $ })
Output
Script Error: ReferenceError: a is not defined
ICE: Assertion 'JERRY_CONTEXT (jmem_heap_allocated_size) == 0' failed at jerryscript/jerry-core/jmem/jmem-heap.c(jmem_heap_finalize):107.
Error: ERR_FAILED_INTERNAL_ASSERTION
Backtrace
bt
#0  0xf7fd5079 in __kernel_vsyscall ()
#1  0xf77fc832 in raise () from /lib/i386-linux-gnu/libc.so.6
#2  0xf77fdcc1 in abort () from /lib/i386-linux-gnu/libc.so.6
#3  0x5657a737 in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:30
#4  0x56604cd3 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58
#5  0x56604d14 in jerry_assert_fail (assertion=0x566c7980 "JERRY_CONTEXT (jmem_heap_allocated_size) == 0", file=0x566c7920 "jerryscript/jerry-core/jmem/jmem-heap.c", function=0x5669c9e0 <__func__.4861.lto_priv.111> "jmem_heap_finalize", line=107) at jerryscript/jerry-core/jrt/jrt-fatals.c:82
#6  0x56603ea4 in jmem_heap_finalize () at jerryscript/jerry-core/jmem/jmem-heap.c:107
#7  0x56603cd4 in jmem_finalize () at jerryscript/jerry-core/jmem/jmem-allocator.c:170
#8  0x56675a8b in jerry_cleanup () at jerryscript/jerry-core/api/jerry.c:252
#9  0x5667373d in main (argc=2, argv=0xffffcb24) at jerryscript/jerry-main/main-unix.c:938

Found by Fuzzinator with grammarinator.

dbatyai added a commit to dbatyai/jerryscript that referenced this issue Nov 11, 2019
Fixes jerryscript-project#3297

JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai@inf.u-szeged.hu
@rerobika rerobika added bug Undesired behaviour ES2015 Related to ES2015 features labels Nov 11, 2019
dbatyai added a commit to dbatyai/jerryscript that referenced this issue Nov 11, 2019
Fixes jerryscript-project#3297

JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai@inf.u-szeged.hu
zherczeg pushed a commit that referenced this issue Nov 12, 2019
Fixes #3297

JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai@inf.u-szeged.hu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Undesired behaviour ES2015 Related to ES2015 features
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants