Skip to content

Unreachable control path in ecma_copy_ecma_string #785

@renatahodovan

Description

@renatahodovan
Jerry version:
Checked revision: 2c3c952
Build: debug.linux
OS:
Ubuntu 15.10, x86_64
Test case:
try { RegExp.prototype.toString() } catch (err) {  }
try { isNaN.apply(unescape, JSON.stringify) } catch (err) {  }
try { Array.prototype.forEach(eval) } catch (err) {  }
try { RegExp.prototype.compile(RegExp.prototype) } catch (err) {  }
Backtrace:
ICE: Unreachable control path at jerryscript/jerry-core/ecma/base/ecma-helpers-string.cpp(ecma_copy_ecma_string):705 was executed.
Error: ERR_FAILED_INTERNAL_ASSERTION

Program received signal SIGABRT, Aborted.
0x00000000004afcc5 in syscall_2_asm () at jerryscript/jerry-libc/target/linux/jerry-asm.S:32
32    SYSCALL_2
(gdb) bt
#0  0x00000000004afcc5 in syscall_2_asm () at jerryscript/jerry-libc/target/linux/jerry-asm.S:32
#1  0x00000000004003c2 in syscall_2 (syscall_no=62, arg1=6466, arg2=6)
    at jerryscript/jerry-libc/target/linux/jerry-libc-target.c:96
#2  0x0000000000400563 in abort () at jerryscript/jerry-libc/target/linux/jerry-libc-target.c:175
#3  0x0000000000437141 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.cpp:67
#4  0x00000000004371fa in jerry_unreachable (comment=0x0, 
    file=0x4c9390 "jerryscript/jerry-core/ecma/base/ecma-helpers-string.cpp", 
    function=0x4b54d0 <_ZZL21ecma_copy_ecma_stringP13ecma_string_tE8__func__.lto_priv.713> "ecma_copy_ecma_string", line=705)
    at jerryscript/jerry-core/jrt/jrt-fatals.cpp:126
#5  0x000000000045accf in ecma_copy_ecma_string (string_desc_p=0x8e79e0 <mem_heap+1696>)
    at jerryscript/jerry-core/ecma/base/ecma-helpers-string.cpp:705
#6  0x000000000045ad95 in ecma_copy_or_ref_ecma_string (string_desc_p=0x8e79e0 <mem_heap+1696>)
    at jerryscript/jerry-core/ecma/base/ecma-helpers-string.cpp:728
#7  0x0000000000454064 in ecma_copy_value (value=850, do_ref_if_object=false)
    at jerryscript/jerry-core/ecma/base/ecma-helpers-value.cpp:386
#8  0x000000000045ee9c in ecma_named_data_property_assign_value (obj_p=0x8e7988 <mem_heap+1608>, prop_p=0x8e79e8 <mem_heap+1704>, value=850)
    at jerryscript/jerry-core/ecma/base/ecma-helpers.cpp:1004
#9  0x00000000004578b5 in re_initialize_props (re_obj_p=0x8e7988 <mem_heap+1608>, source_p=0x8e79e0 <mem_heap+1696>, flags=0 '\000')
    at jerryscript/jerry-core/ecma/operations/ecma-regexp-object.cpp:149
#10 0x000000000041c6b1 in ecma_builtin_regexp_prototype_compile (this_arg=807, pattern_arg=807, flags_arg=4)
    at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-regexp-prototype.cpp:143
#11 0x000000000041c2d1 in ecma_builtin_regexp_prototype_dispatch_routine (builtin_routine_id=201, this_arg_value=807, 
    arguments_list=0x9266c0 <mem_heap+258944>, arguments_number=1)
    at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-regexp-prototype.inc.h:90
#12 0x000000000049c691 in ecma_builtin_dispatch_routine (builtin_object_id=ECMA_BUILTIN_ID_REGEXP_PROTOTYPE, builtin_routine_id=201, this_arg_value=807, arguments_list=0x9266c0 <mem_heap+258944>, arguments_number=1)
    at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.inc.h:163
#13 0x000000000049bd7d in ecma_builtin_dispatch_call (obj_p=0x8e7bc8 <mem_heap+2184>, this_arg_value=807, arg_collection_p=0x8e7bf0 <mem_heap+2224>)
    at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.cpp:555
#14 0x000000000044a4bd in ecma_op_function_call (func_obj_p=0x8e7bc8 <mem_heap+2184>, this_arg_value=807, arg_collection_p=0x8e7bf0 <mem_heap+2224>)
    at jerryscript/jerry-core/ecma/operations/ecma-function-object.cpp:1049
#15 0x00000000004346d1 in opfunc_call_n (instr=..., frame_ctx_p=0x7fffffffcd80) at jerryscript/jerry-core/vm/opcodes.cpp:808
#16 0x00000000004a7f45 in vm_loop (frame_ctx_p=0x7fffffffcd80, run_scope_p=0x7fffffffccd0)
    at jerryscript/jerry-core/vm/vm.cpp:545
#17 0x00000000004a030f in opfunc_try_block (instr=..., frame_ctx_p=0x7fffffffcd80)
    at jerryscript/jerry-core/vm/opcodes-ecma-try-catch-finally.cpp:41
#18 0x00000000004a7f45 in vm_loop (frame_ctx_p=0x7fffffffcd80, run_scope_p=0x0) at jerryscript/jerry-core/vm/vm.cpp:545
#19 0x00000000004a81da in vm_run_from_pos (header_p=0x8e7800 <mem_heap+1216>, start_pos=1, this_binding_value=523, lex_env_p=0x8e7760 <mem_heap+1056>, 
    is_strict=false, is_eval_code=false, arg_collection_p=0x0) at jerryscript/jerry-core/vm/vm.cpp:643
#20 0x00000000004a7c3e in vm_run_global () at jerryscript/jerry-core/vm/vm.cpp:415
#21 0x00000000004aaed9 in jerry_run () at jerryscript/jerry-core/jerry.cpp:1533
#22 0x00000000004a96b1 in main (argc=3, argv=0x7fffffffd3a8) at jerryscript/main-linux.cpp:459

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugUndesired behaviour

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions