Issue #11560 has been reported by Hans Mackowiak.

----------------------------------------
Bug #11560: crash in rb_vm_proc_envval after symbol change
https://bugs.ruby-lang.org/issues/11560

* Author: Hans Mackowiak
* Status: Open
* Priority: Normal
* Assignee: 
* ruby -v: ruby 2.3.0dev (2015-10-01 trunk 51995) [x86_64-linux]
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN
----------------------------------------

somewhere in "git diff c2310ba..c90550c" where was some kind of heisenbug (its hard to debug because sometimes the crash does not happen)


below is the backtrace i got from running with gdb

#0  rb_vm_proc_envval (proc=proc@entry=0x87bf20) at vm.c:725
#1  0x00007ffff797c8f5 in proc_mark (ptr=0x87bf20) at proc.c:51
#2  0x00007ffff79971ad in gc_mark_stacked_objects (incremental=<optimized out>, count=<optimized out>, objspace=<optimized out>) at gc.c:4464
#3  gc_mark_stacked_objects_all (objspace=<optimized out>) at gc.c:4504
#4  gc_marks_rest (objspace=0x6039f0) at gc.c:5327
#5  0x00007ffff79977e5 in gc_marks (full_mark=<optimized out>, objspace=0x6039f0) at gc.c:5387
#6  gc_start (objspace=0x6039f0, full_mark=<optimized out>, immediate_mark=<optimized out>, immediate_sweep=<optimized out>, reason=<optimized out>) at gc.c:6172
#7  0x00007ffff7999316 in heap_prepare (heap=0x603a10, objspace=0x6039f0) at gc.c:1632
#8  heap_get_freeobj_from_next_freepage (heap=<optimized out>, objspace=<optimized out>) at gc.c:1644
#9  heap_get_freeobj (heap=0x603a10, objspace=0x6039f0) at gc.c:1668
#10 newobj_of (klass=<optimized out>, flags=13, v1=0, v2=0, v3=0) at gc.c:1722
#11 0x00007ffff7a22dcc in match_alloc (klass=<optimized out>) at re.c:900
#12 rb_reg_search0 (re=9830120, str=6325000, pos=10, reverse=2, set_backref_str=8280744) at re.c:1518
#13 0x00007ffff7a72b56 in str_gsub (argc=<optimized out>, argv=<optimized out>, str=6325000, bang=1) at string.c:4540
#14 0x00007ffff7ad9a0e in vm_call0_cfunc_with_frame (ci=<optimized out>, cc=<optimized out>, argv=<optimized out>, calling=<optimized out>, th=<optimized out>) at vm_eval.c:131
#15 vm_call0_cfunc (argv=<optimized out>, cc=<optimized out>, ci=<optimized out>, calling=<optimized out>, th=<optimized out>) at vm_eval.c:148
#16 vm_call0_body (th=0x6035f0, calling=0x3, ci=0x608308, cc=0x2, cc@entry=0x7fffffffbaf0, argv=0x7fffffffbb60) at vm_eval.c:186
#17 0x00007ffff7ada66e in vm_call0 (me=<optimized out>, argv=0x7fffffffbb60, argc=2, id=6799, recv=6325000, th=<optimized out>) at vm_eval.c:61
#18 rb_call0 (recv=6325000, recv@entry=140737488337904, mid=6799, argc=argc@entry=2, argv=0x7fffffffbb60, scope=scope@entry=CALL_FCALL, self=<optimized out>) at vm_eval.c:351
#19 0x00007ffff7adb152 in rb_call (scope=CALL_FCALL, argv=<optimized out>, argc=2, mid=<optimized out>, recv=140737488337904) at vm_eval.c:630
#20 rb_funcall (recv=recv@entry=6325000, mid=<optimized out>, n=n@entry=2) at vm_eval.c:828
#21 0x00007ffff5ce3f67 in date__parse (str=6325000, comp=20) at date_parse.c:2213
#22 0x00007ffff5cc848f in date_s__parse_internal (argc=argc@entry=2, argv=argv@entry=0x7fffffffbcb0, klass=<optimized out>) at date_core.c:4300
#23 0x00007ffff5cdc04f in date_s__parse (klass=8699520, argv=0x7fffffffbcb0, argc=2) at date_core.c:4332
#24 datetime_s_parse (argc=1, argv=<optimized out>, klass=8699520) at date_core.c:7931
#25 0x00007ffff7ac635d in vm_call_cfunc_with_frame (ci=<optimized out>, cc=<optimized out>, calling=<optimized out>, reg_cfp=0x7ffff7fc0e10, th=<optimized out>) at vm_insnhelper.c:1621
#26 vm_call_cfunc (th=<optimized out>, reg_cfp=<optimized out>, calling=<optimized out>, ci=<optimized out>, cc=<optimized out>) at vm_insnhelper.c:1716
#27 0x00007ffff7acfba0 in vm_exec_core (th=th@entry=0x6035f0, initial=initial@entry=0) at insns.def:978
#28 0x00007ffff7ad4e0f in vm_exec (th=th@entry=0x6035f0) at vm.c:1476
#29 0x00007ffff7ad5dc9 in invoke_block_from_c (th=0x6035f0, block=<optimized out>, self=6711080, argc=argc@entry=1, argv=argv@entry=0x7fffffffc468, blockptr=blockptr@entry=0x0, cref=0x0, splattable=1)    at vm.c:852
#30 0x00007ffff7ad610c in vm_yield (argc=<optimized out>, argv=<optimized out>, th=<optimized out>) at vm.c:890
#31 rb_yield_0 (argv=<optimized out>, argc=<optimized out>) at vm_eval.c:1003
#32 rb_yield (val=6326360) at vm_eval.c:1013
#33 0x00007ffff7927a2d in rb_ary_collect (ary=6326560) at array.c:2738
#34 0x00007ffff7ac635d in vm_call_cfunc_with_frame (ci=<optimized out>, cc=<optimized out>, calling=<optimized out>, reg_cfp=0x7ffff7fc0e90, th=<optimized out>) at vm_insnhelper.c:1621
#35 vm_call_cfunc (th=<optimized out>, reg_cfp=<optimized out>, calling=<optimized out>, ci=<optimized out>, cc=<optimized out>) at vm_insnhelper.c:1716
#36 0x00007ffff7acfac5 in vm_exec_core (th=th@entry=0x6035f0, initial=initial@entry=0) at insns.def:947
#37 0x00007ffff7ad4e0f in vm_exec (th=th@entry=0x6035f0) at vm.c:1476
#38 0x00007ffff7ad5dc9 in invoke_block_from_c (th=0x6035f0, block=<optimized out>, self=6711080, argc=argc@entry=1, argv=argv@entry=0x7fffffffcc18, blockptr=blockptr@entry=0x0, cref=0x0, splattable=1)    at vm.c:852
#39 0x00007ffff7ad610c in vm_yield (argc=<optimized out>, argv=<optimized out>, th=<optimized out>) at vm.c:890
#40 rb_yield_0 (argv=<optimized out>, argc=<optimized out>) at vm_eval.c:1003
#41 rb_yield (val=9979600) at vm_eval.c:1013
#42 0x00007ffff7927a2d in rb_ary_collect (ary=6331640) at array.c:2738
#43 0x00007ffff7ac635d in vm_call_cfunc_with_frame (ci=<optimized out>, cc=<optimized out>, calling=<optimized out>, reg_cfp=0x7ffff7fc0f10, th=<optimized out>) at vm_insnhelper.c:1621
#44 vm_call_cfunc (th=<optimized out>, reg_cfp=<optimized out>, calling=<optimized out>, ci=<optimized out>, cc=<optimized out>) at vm_insnhelper.c:1716
#45 0x00007ffff7acfac5 in vm_exec_core (th=th@entry=0x6035f0, initial=initial@entry=0) at insns.def:947
#46 0x00007ffff7ad4e0f in vm_exec (th=th@entry=0x6035f0) at vm.c:1476
#47 0x00007ffff7ad5dc9 in invoke_block_from_c (th=0x6035f0, block=<optimized out>, self=6711080, argc=argc@entry=1, argv=argv@entry=0x7fffffffd3c8, blockptr=blockptr@entry=0x0, cref=0x0, splattable=1)    at vm.c:852
#48 0x00007ffff7ad610c in vm_yield (argc=<optimized out>, argv=<optimized out>, th=<optimized out>) at vm.c:890
#49 rb_yield_0 (argv=<optimized out>, argc=<optimized out>) at vm_eval.c:1003
#50 rb_yield (val=9901160) at vm_eval.c:1013
#51 0x00007ffff7927a2d in rb_ary_collect (ary=9896720) at array.c:2738
#52 0x00007ffff7ac635d in vm_call_cfunc_with_frame (ci=<optimized out>, cc=<optimized out>, calling=0x6535b0, reg_cfp=0x7ffff7fc0f90, th=<optimized out>) at vm_insnhelper.c:1621
#53 vm_call_cfunc (th=th@entry=0x6035f0, reg_cfp=reg_cfp@entry=0x7ffff7fc0f90, calling=calling@entry=0x7fffffffd600, ci=<optimized out>, cc=<optimized out>) at vm_insnhelper.c:1716
#54 0x00007ffff7ad6f4e in vm_call_method (th=0x6035f0, cfp=0x7ffff7fc0f90, calling=0x7fffffffd600, ci=<optimized out>, cc=<optimized out>) at vm_insnhelper.c:2023
#55 0x00007ffff7acfac5 in vm_exec_core (th=th@entry=0x6035f0, initial=initial@entry=0) at insns.def:947
#56 0x00007ffff7ad4e0f in vm_exec (th=0x6035f0) at vm.c:1476
#57 0x00007ffff7ad9763 in rb_iseq_eval_main (iseq=iseq@entry=0x8d1f30) at vm.c:1718
#58 0x00007ffff7974e5f in ruby_exec_internal (n=0x8d1f30) at eval.c:244
#59 0x00007ffff7976f2d in ruby_exec_node (n=n@entry=0x8d1f30) at eval.c:309
#60 0x00007ffff79795ee in ruby_run_node (n=0x8d1f30) at eval.c:301
#61 0x000000000040088b in main (argc=2, argv=0x7fffffffde08) at main.c:36




-- 
https://bugs.ruby-lang.org/