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 'ECMA_STRING_IS_REF_EQUALS_TO_ONE (string_p)' failed in ecma_free_string_list #1545

Closed
renatahodovan opened this issue Jan 30, 2017 · 1 comment
Labels
bug Undesired behaviour

Comments

@renatahodovan
Copy link
Contributor

Jerry version:
Checked revision: 7b59c80
Build: debug.linux
OS:
Ubuntu 16.04, x86_64
Test case:

Two test cases are needed to reproduce the failure (./jerry 1.js 2.js):

1.js:

var fz = [{"a": []}];

var fn = function () {
    return function(){};
}

for (var i = 0;; i++) {
    if (!fz[i])
        break;
    fn();
}

2.js:

delete a;
Backtrace:
ICE: Assertion 'ECMA_STRING_IS_REF_EQUALS_TO_ONE (string_p)' failed at jerryscript/jerry-core/ecma/base/ecma-literal-storage.c(ecma_free_string_list):42.
Error: ERR_FAILED_INTERNAL_ASSERTION

Program received signal SIGABRT, Aborted.
0x000000000046dabd in syscall_2 () at jerryscript/jerry-libc/target/posix/jerry-asm.S:59
59    SYSCALL_2
(gdb) bt
#0  0x000000000046dabd in syscall_2 () at jerryscript/jerry-libc/target/posix/jerry-asm.S:59
#1  0x0000000000402760 in raise (sig=6) at jerryscript/jerry-libc/target/posix/jerry-libc-target.c:91
#2  0x0000000000402732 in abort () at jerryscript/jerry-libc/target/posix/jerry-libc-target.c:77
#3  0x00000000004113c6 in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION)
    at jerryscript/targets/default/jerry-port-default-fatal.c:53
#4  0x000000000042ce70 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:61
#5  0x000000000042cec2 in jerry_assert_fail (assertion=0x471288 "ECMA_STRING_IS_REF_EQUALS_TO_ONE (string_p)", 
    file=0x471228 "jerryscript/jerry-core/ecma/base/ecma-literal-storage.c", 
    function=0x4876d0 <__func__.3376.lto_priv.109> "ecma_free_string_list", line=42)
    at jerryscript/jerry-core/jrt/jrt-fatals.c:85
#6  0x00000000004136de in ecma_free_string_list (string_list_p=0x691248 <jerry_global_heap+80>)
    at jerryscript/jerry-core/ecma/base/ecma-literal-storage.c:42
#7  0x000000000041375f in ecma_finalize_lit_storage () at jerryscript/jerry-core/ecma/base/ecma-literal-storage.c:59
#8  0x00000000004581b7 in ecma_finalize () at jerryscript/jerry-core/ecma/base/ecma-init-finalize.c:62
#9  0x000000000046d93b in jerry_cleanup () at jerryscript/jerry-core/jerry.c:167
#10 0x000000000046d806 in main (argc=4, argv=0x7fffffffd2f8) at jerryscript/jerry-main/main-unix.c:806
@LaszloLango LaszloLango added the bug Undesired behaviour label Jan 30, 2017
@galpeter
Copy link
Contributor

Did a quick check, maybe it'll help:
If the 1.js has the following content:

var fn = function () {
    return function(){}
}
fn();

and the 2.js is the following:

/**/

the same assert is triggered.

zherczeg added a commit to zherczeg/jerryscript that referenced this issue Feb 13, 2017
zherczeg added a commit to zherczeg/jerryscript that referenced this issue Feb 14, 2017
zherczeg added a commit that referenced this issue Feb 14, 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

No branches or pull requests

3 participants