jerryscript
jerryscript copied to clipboard
Assertion 'mem_is_heap_pointer (MEM_HEAP_GET_ADDR_FROM_OFFSET (next_offset)) || next_offset == MEM_HEAP_GET_OFFSET_FROM_ADDR (MEM_HEAP_END_OF_LIST)' in mem_heap_alloc_block_internal
Jerry version:
Checked revision: e1c8a2e
Build: debug.linux
OS:
Ubuntu 15.10, x86_64
Test case:
try { new (RegExp)().$() } catch($){}
try { RegExp.prototype.compile() } catch($){}
try { new (this.$)(1, RegExp.prototype.compile(RegExp.prototype)) } catch($){}
Backtrace:
ICE: Assertion 'mem_is_heap_pointer (MEM_HEAP_GET_ADDR_FROM_OFFSET (next_offset)) || next_offset == MEM_HEAP_GET_OFFSET_FROM_ADDR (MEM_HEAP_END_OF_LIST)' failed at jerryscript/jerry-core/mem/mem-heap.c(mem_heap_alloc_block_internal):298.
Error: ERR_FAILED_INTERNAL_ASSERTION
Program received signal SIGABRT, Aborted.
0x0000000000485b37 in syscall_2 () at jerryscript/jerry-libc/target/posix/jerry-asm.S:60
60 SYSCALL_2
(gdb) bt
#0 0x0000000000485b37 in syscall_2 () at jerryscript/jerry-libc/target/posix/jerry-asm.S:60
#1 0x000000000040037f in raise (sig=6) at jerryscript/jerry-libc/target/posix/jerry-libc-target.c:92
#2 0x0000000000400351 in abort () at jerryscript/jerry-libc/target/posix/jerry-libc-target.c:78
#3 0x000000000041d117 in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION)
at jerryscript/targets/default/jerry-port-default-fatal.c:54
#4 0x000000000041cd58 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:68
#5 0x000000000041cd9f in jerry_assert_fail (
assertion=0x4a8d80 "mem_is_heap_pointer (MEM_HEAP_GET_ADDR_FROM_OFFSET (next_offset)) || next_offset == MEM_HEAP_GET_OFFSET_FROM_ADDR (MEM_HEAP_END_OF_LIST)", file=0x4a8ca8 "jerryscript/jerry-core/mem/mem-heap.c",
function=0x4874f0 <__func__.1971.lto_priv.819> "mem_heap_alloc_block_internal", line=298)
at jerryscript/jerry-core/jrt/jrt-fatals.c:95
#6 0x000000000048558c in mem_heap_alloc_block_internal (size=16) at jerryscript/jerry-core/mem/mem-heap.c:297
#7 0x000000000048571a in mem_heap_alloc_block (size=16) at jerryscript/jerry-core/mem/mem-heap.c:391
#8 0x000000000044a2f9 in ecma_alloc_property_pair () at jerryscript/jerry-core/ecma/base/ecma-alloc.c:107
#9 0x0000000000443c47 in ecma_create_property (object_p=0x8b34a0 <mem_heap+1056>, name_p=0x0, type_and_flags=1 '\001', value=...)
at jerryscript/jerry-core/ecma/base/ecma-helpers.c:456
#10 0x0000000000443dd4 in ecma_create_internal_property (object_p=0x8b34a0 <mem_heap+1056>, property_id=ECMA_INTERNAL_PROPERTY_CLASS)
at jerryscript/jerry-core/ecma/base/ecma-helpers.c:504
#11 0x000000000043209f in ecma_new_standard_error (error_type=ECMA_ERROR_TYPE)
at jerryscript/jerry-core/ecma/operations/ecma-exceptions.c:96
#12 0x00000000004321b5 in ecma_raise_standard_error (error_type=ECMA_ERROR_TYPE, msg_p=0x0)
at jerryscript/jerry-core/ecma/operations/ecma-exceptions.c:153
#13 0x000000000043227f in ecma_raise_type_error (msg_p=0x0) at jerryscript/jerry-core/ecma/operations/ecma-exceptions.c:238
#14 0x000000000047aea8 in opfunc_construct.lto_priv.798 (frame_ctx_p=0x7fffffffcba0) at jerryscript/jerry-core/vm/vm.c:431
#15 0x000000000047a139 in vm_execute (frame_ctx_p=0x7fffffffcba0, arg_p=0x0, arg_list_len=0)
at jerryscript/jerry-core/vm/vm.c:2509
#16 0x000000000047a1bf in vm_run_with_inline_stack.lto_priv.796 (frame_ctx_p=0x7fffffffcba0, arg_p=0x0, arg_list_len=1)
at jerryscript/jerry-core/vm/vm.c:2540
#17 0x00000000004766d0 in vm_run (bytecode_header_p=0x8b3288 <mem_heap+520>, this_binding_value=35, lex_env_p=0x8b30b8 <mem_heap+56>, is_eval_code=false,
arg_list_p=0x0, arg_list_len=1) at jerryscript/jerry-core/vm/vm.c:2614
#18 0x000000000047a9d2 in vm_run_global (error_value_p=0x7fffffffcc88) at jerryscript/jerry-core/vm/vm.c:190
#19 0x000000000048194a in jerry_run (error_value_p=0x7fffffffce20) at jerryscript/jerry-core/jerry.c:1748
#20 0x000000000047fbc2 in main (argc=3, argv=0x7fffffffd318) at jerryscript/main-unix.c:511
Works on current master (97be8bf).