diff options
author | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-07-25 14:29:28 +0000 |
---|---|---|
committer | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-07-25 14:29:28 +0000 |
commit | 9a27239558d384b197c650e5d12be1d12c33631f (patch) | |
tree | 57ace245e6d76680ca5ac4959dea6eab75b2bbb4 /vm_core.h | |
parent | f23ad92a959ba0a09a9c5c4d4ebbd4aef4b676fe (diff) | |
download | ruby-9a27239558d384b197c650e5d12be1d12c33631f.tar.gz |
* proc.c (struct METHOD), gc.c (gc_marks), vm_method.c
(rb_gc_mark_unlinked_live_method_entries): fix SEGV bug.
rb_method_entry_t was free'd even when the method is still on the
stack if it is BMETHOD (i.e., Method#call). This is because
rb_method_entry_t is embedded in struct METHOD. This commit
separates them and marks the live method entries.
See [ruby-core:38449] in detail. fix [Bug #5047] [ruby-core:38171]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32669 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_core.h')
-rw-r--r-- | vm_core.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -647,6 +647,8 @@ void rb_vm_inc_const_missing_count(void); void rb_vm_gvl_destroy(rb_vm_t *vm); VALUE rb_vm_call(rb_thread_t *th, VALUE recv, VALUE id, int argc, const VALUE *argv, const rb_method_entry_t *me); +void rb_unlink_method_entry(rb_method_entry_t *me); +void rb_gc_mark_unlinked_live_method_entries(void *pvm); void rb_thread_start_timer_thread(void); void rb_thread_stop_timer_thread(int); |