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' failed in jmem_heap_allocated_size #2069

Closed
renatahodovan opened this issue Nov 3, 2017 · 1 comment · Fixed by #2071
Labels
bug Undesired behaviour

Comments

@renatahodovan
Copy link
Contributor

Jerry version:
Checked revision: 678fcb20
Build command: ./tools/build.py --clean --debug --error-messages=on
OS:
Ubuntu 17.10
Test case:
null[1] = 'abcd'; 
Backtrace:
Script Error: TypeError: Cannot set property '1' of null
ICE: Assertion 'JERRY_CONTEXT (jmem_heap_allocated_size) == 0' failed at jerryscript/jerry-core/jmem/jmem-heap.c(jmem_heap_finalize):181.
Error: ERR_FAILED_INTERNAL_ASSERTION

Program received signal SIGABRT, Aborted.
0x00000000004760d8 in syscall_2 () at jerryscript/jerry-libc/target/posix/jerry-asm.S:59
59	  SYSCALL_2
(gdb) bt
#0  0x00000000004760d8 in syscall_2 () at jerryscript/jerry-libc/target/posix/jerry-asm.S:59
#1  0x000000000040de02 in raise (sig=6) at jerryscript/jerry-libc/target/posix/jerry-libc-target.c:95
#2  0x000000000040ddd4 in abort () at jerryscript/jerry-libc/target/posix/jerry-libc-target.c:81
#3  0x000000000040712d in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION)
    at jerryscript/jerry-port/default/default-fatal.c:71
#4  0x0000000000448394 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58
#5  0x00000000004483e6 in jerry_assert_fail (assertion=0x47e638 "JERRY_CONTEXT (jmem_heap_allocated_size) == 0", 
    file=0x47e5c0 "jerryscript/jerry-core/jmem/jmem-heap.c", 
    function=0x488400 <__func__.3116.lto_priv.382> "jmem_heap_finalize", line=181)
    at jerryscript/jerry-core/jrt/jrt-fatals.c:82
#6  0x00000000004479ab in jmem_heap_finalize () at jerryscript/jerry-core/jmem/jmem-heap.c:181
#7  0x0000000000447620 in jmem_finalize () at jerryscript/jerry-core/jmem/jmem-allocator.c:51
#8  0x00000000004661da in jerry_cleanup () at jerryscript/jerry-core/api/jerry.c:220
#9  0x00000000004655be in main (argc=3, argv=0x7fffffffdf68) at jerryscript/jerry-main/main-unix.c:911

Found by Fuzzinator with grammarinator.

@renatahodovan
Copy link
Contributor Author

Note: the failure only happens if the error-messages are enabled (--error-messages=on).

@akosthekiss akosthekiss added the bug Undesired behaviour label Nov 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Undesired behaviour
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants