diff options
author | shugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-11-10 08:33:28 +0000 |
---|---|---|
committer | shugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-11-10 08:33:28 +0000 |
commit | 66c127bc6f95761f967efc5109cd229973fbc50f (patch) | |
tree | bdf15386a6e3d19ec3198407669788ad6982da0e /thread.c | |
parent | f3a250758d9165385061504ba1bee6b33f8cb50d (diff) | |
download | ruby-66c127bc6f95761f967efc5109cd229973fbc50f.tar.gz |
* thread.c (call_trace_proc): don't call ID2SYM() for ID_ALLOCATOR
to avoid SEGV.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13864 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread.c')
-rw-r--r-- | thread.c | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -2890,10 +2890,20 @@ call_trace_proc(VALUE args) VALUE eventname = rb_str_new2(get_event_name(p->event)); VALUE filename = rb_str_new2(rb_sourcefile()); int line = rb_sourceline(); + VALUE mid; + if (p->id == ID_ALLOCATOR) { + mid = ID2SYM(rb_intern("allocate")); + } + else if (p->id) { + mid = ID2SYM(p->id); + } + else { + mid = Qnil; + } return rb_proc_call(p->proc, rb_ary_new3(6, eventname, filename, INT2FIX(line), - p->id ? ID2SYM(p->id) : Qnil, + mid, p->self ? rb_binding_new() : Qnil, p->klass ? p->klass : Qnil)); } |