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 '!label_set_p->is_nested_jumpable_border' failed in jsp_label_raise_nested_jumpable_border #164

Closed
renatahodovan opened this issue Jun 9, 2015 · 3 comments
Labels
bug Undesired behaviour normal parser Related to the JavaScript parser

Comments

@renatahodovan
Copy link
Contributor

Jerry version:
Checked revision: d988da8
Build: debug.linux
OS:
Ubuntu 14.04, x86_64
Test case:
for ( ; ; ) {
  with ( v_1 ) {
    with ( v_1 ) { }
  }
}
Backtrace:
ICE: Assertion '!label_set_p->is_nested_jumpable_border' failed at jerryscript/jerry-core/parser/js/jsp-label.cpp(jsp_label_raise_nested_jumpable_border):244.
Error: ERR_FAILED_INTERNAL_ASSERTION

Program received signal SIGABRT, Aborted.
0x00000000004cea1b in syscall_2_asm () at jerryscript/jerry-libc/target/linux/jerry-asm.S:32
32    SYSCALL_2
(gdb) bt
#0  0x00000000004cea1b in syscall_2_asm () at jerryscript/jerry-libc/target/linux/jerry-asm.S:32
#1  0x0000000000402a3b in syscall_2 (syscall_no=62, arg1=22992, arg2=6)
    at jerryscript/jerry-libc/target/linux/jerry-libc-target.c:105
#2  0x0000000000402bdc in abort () at jerryscript/jerry-libc/target/linux/jerry-libc-target.c:184
#3  0x000000000046a14c in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.cpp:70
#4  0x000000000046a19b in jerry_assert_fail (assertion=0x4d9188 "!label_set_p->is_nested_jumpable_border", 
    file=0x4d8f50 "jerryscript/jerry-core/parser/js/jsp-label.cpp", 
    function=0x4d4ec0 <_ZZ38jsp_label_raise_nested_jumpable_bordervE12__FUNCTION__.42915> "jsp_label_raise_nested_jumpable_border", line=244)
    at jerryscript/jerry-core/jrt/jrt-fatals.cpp:97
#5  0x00000000004109f3 in jsp_label_raise_nested_jumpable_border () at jerryscript/jerry-core/parser/js/jsp-label.cpp:244
#6  0x0000000000468039 in parse_with_statement () at jerryscript/jerry-core/parser/js/parser.cpp:1901
#7  0x0000000000468d77 in parse_statement (outermost_stmt_label_p=0x0) at jerryscript/jerry-core/parser/js/parser.cpp:2363
#8  0x0000000000467d5d in parse_statement_list () at jerryscript/jerry-core/parser/js/parser.cpp:1778
#9  0x0000000000468865 in parse_statement (outermost_stmt_label_p=0x0) at jerryscript/jerry-core/parser/js/parser.cpp:2259
#10 0x0000000000468058 in parse_with_statement () at jerryscript/jerry-core/parser/js/parser.cpp:1905
#11 0x0000000000468d77 in parse_statement (outermost_stmt_label_p=0x0) at jerryscript/jerry-core/parser/js/parser.cpp:2363
#12 0x0000000000467d5d in parse_statement_list () at jerryscript/jerry-core/parser/js/parser.cpp:1778
#13 0x0000000000468865 in parse_statement (outermost_stmt_label_p=0x0) at jerryscript/jerry-core/parser/js/parser.cpp:2259
#14 0x0000000000467946 in parse_plain_for (outermost_stmt_label_p=0x7fffffffd470)
    at jerryscript/jerry-core/parser/js/parser.cpp:1627
#15 0x0000000000467b09 in parse_for_or_for_in_statement (outermost_stmt_label_p=0x7fffffffd470)
    at jerryscript/jerry-core/parser/js/parser.cpp:1704
#16 0x00000000004687d4 in parse_iterational_statement (outermost_named_stmt_label_p=0x0)
    at jerryscript/jerry-core/parser/js/parser.cpp:2172
#17 0x0000000000468951 in parse_statement (outermost_stmt_label_p=0x0) at jerryscript/jerry-core/parser/js/parser.cpp:2292
#18 0x000000000046903d in parse_source_element () at jerryscript/jerry-core/parser/js/parser.cpp:2444
#19 0x0000000000469897 in parse_source_element_list(bool) [clone .32684] (is_global=true)
    at jerryscript/jerry-core/parser/js/parser.cpp:2752
#20 0x000000000046994b in parser_parse_program () at jerryscript/jerry-core/parser/js/parser.cpp:2771
#21 0x00000000004cbd02 in jerry_parse (source_p=0x6f9700 <_ZL13source_buffer.2441> "for ( ; ; ) {\n  with ( v_1 ) {\n    with ( v_1 ) { }\n  }\n}", 
    source_size=57) at jerryscript/jerry-core/jerry.cpp:1224
#22 0x00000000004ca344 in main (argc=3, argv=0x7fffffffd8f8) at jerryscript/main-linux.cpp:243
@ruben-ayrapetyan ruben-ayrapetyan added bug Undesired behaviour normal parser Related to the JavaScript parser labels Jun 9, 2015
@ruben-ayrapetyan ruben-ayrapetyan added this to the Core ECMA features milestone Jun 9, 2015
@ruben-ayrapetyan
Copy link
Contributor

Issue is caused by missing support of double setting 'nested jumpable border' mark to one label.
To fix the issue the jsp_label_raise_nested_jumpable_border should return previous value of flag, and jsp_label_remove_nested_jumpable_border (maybe, should be renamed to jsp_label_restore_nested_jumpable_border) should accept the saved previous value to write it into label descriptor.

ruben-ayrapetyan added a commit that referenced this issue Jun 29, 2015
Related issue: #164

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan [email protected]
ruben-ayrapetyan added a commit that referenced this issue Jun 29, 2015
Related issue: #164

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan [email protected]
@ruben-ayrapetyan
Copy link
Contributor

Pull request with fix: #259

ruben-ayrapetyan added a commit that referenced this issue Jun 30, 2015
Related issue: #164

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan [email protected]
@egavrin
Copy link
Contributor

egavrin commented Jun 30, 2015

Fixed 7b90d54.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Undesired behaviour normal parser Related to the JavaScript parser
Projects
None yet
Development

No branches or pull requests

3 participants