* 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
This commit is contained in:
parent
f3a250758d
commit
66c127bc6f
@ -1,3 +1,8 @@
|
|||||||
|
Sat Nov 10 17:27:55 2007 Shugo Maeda <shugo@ruby-lang.org>
|
||||||
|
|
||||||
|
* thread.c (call_trace_proc): don't call ID2SYM() for ID_ALLOCATOR
|
||||||
|
to avoid SEGV.
|
||||||
|
|
||||||
Sat Nov 10 16:37:07 2007 Eric Hodel <drbrain@segment7.net>
|
Sat Nov 10 16:37:07 2007 Eric Hodel <drbrain@segment7.net>
|
||||||
|
|
||||||
* lib/rubygems: Import RubyGems revision 1493.
|
* lib/rubygems: Import RubyGems revision 1493.
|
||||||
|
12
thread.c
12
thread.c
@ -2890,10 +2890,20 @@ call_trace_proc(VALUE args)
|
|||||||
VALUE eventname = rb_str_new2(get_event_name(p->event));
|
VALUE eventname = rb_str_new2(get_event_name(p->event));
|
||||||
VALUE filename = rb_str_new2(rb_sourcefile());
|
VALUE filename = rb_str_new2(rb_sourcefile());
|
||||||
int line = rb_sourceline();
|
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,
|
return rb_proc_call(p->proc, rb_ary_new3(6,
|
||||||
eventname, filename, INT2FIX(line),
|
eventname, filename, INT2FIX(line),
|
||||||
p->id ? ID2SYM(p->id) : Qnil,
|
mid,
|
||||||
p->self ? rb_binding_new() : Qnil,
|
p->self ? rb_binding_new() : Qnil,
|
||||||
p->klass ? p->klass : Qnil));
|
p->klass ? p->klass : Qnil));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user