Skip to content

Segmentation fault in re_get_value #782

@renatahodovan

Description

@renatahodovan
Jerry version:
Checked revision: 2c3c952
Build: debug.linux
OS:
Ubuntu 15.10, x86_64
Test case:
String.prototype.search(RegExp.prototype);
Backtrace:
Program received signal SIGSEGV, Segmentation fault.
0x00000000004425b7 in re_get_value (bc_p=0x7fffffffc920) at jerryscript/jerry-core/parser/regexp/re-compiler.cpp:202
202   uint32_t value = *((uint32_t*) *bc_p);
(gdb) bt
#0  0x00000000004425b7 in re_get_value (bc_p=0x7fffffffc920) at jerryscript/jerry-core/parser/regexp/re-compiler.cpp:202
#1  0x000000000044e147 in ecma_regexp_exec_helper (regexp_value=783, input_string=718, ignore_global=true)
    at jerryscript/jerry-core/ecma/operations/ecma-regexp-object.cpp:1243
#2  0x000000000048b477 in ecma_builtin_string_prototype_object_search (this_arg=711, regexp_arg=783)
    at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-string-prototype.cpp:1396
#3  0x0000000000487616 in ecma_builtin_string_prototype_dispatch_routine (builtin_routine_id=135, this_arg_value=711, 
    arguments_list=0x9266c0 <mem_heap+258944>, arguments_number=1)
    at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-string-prototype.inc.h:74
#4  0x000000000049c559 in ecma_builtin_dispatch_routine (builtin_object_id=ECMA_BUILTIN_ID_STRING_PROTOTYPE, builtin_routine_id=135, this_arg_value=711, 
    arguments_list=0x9266c0 <mem_heap+258944>, arguments_number=1)
    at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.inc.h:55
#5  0x000000000049bd7d in ecma_builtin_dispatch_call (obj_p=0x8e7900 <mem_heap+1472>, this_arg_value=711, arg_collection_p=0x8e7918 <mem_heap+1496>)
    at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.cpp:555
#6  0x000000000044a4bd in ecma_op_function_call (func_obj_p=0x8e7900 <mem_heap+1472>, this_arg_value=711, arg_collection_p=0x8e7918 <mem_heap+1496>)
    at jerryscript/jerry-core/ecma/operations/ecma-function-object.cpp:1049
#7  0x00000000004346d1 in opfunc_call_n (instr=..., frame_ctx_p=0x7fffffffcd80) at jerryscript/jerry-core/vm/opcodes.cpp:808
#8  0x00000000004a7f45 in vm_loop (frame_ctx_p=0x7fffffffcd80, run_scope_p=0x0) at jerryscript/jerry-core/vm/vm.cpp:545
#9  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
#10 0x00000000004a7c3e in vm_run_global () at jerryscript/jerry-core/vm/vm.cpp:415
#11 0x00000000004aaed9 in jerry_run () at jerryscript/jerry-core/jerry.cpp:1533
#12 0x00000000004a96b1 in main (argc=2, argv=0x7fffffffd3a8) at jerryscript/main-linux.cpp:459

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugUndesired behaviourecma builtinsRelated to ECMA built-in routines

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions