[前][次][番号順一覧][スレッド一覧]

ruby-changes:2373

From: ko1@a...
Date: 10 Nov 2007 17:33:42 +0900
Subject: [ruby-changes:2373] shugo - Ruby:r13864 (trunk): * thread.c (call_trace_proc): don't call ID2SYM() for ID_ALLOCATOR

shugo	2007-11-10 17:33:28 +0900 (Sat, 10 Nov 2007)

  New Revision: 13864

  Modified files:
    trunk/ChangeLog
    trunk/thread.c

  Log:
    * thread.c (call_trace_proc): don't call ID2SYM() for ID_ALLOCATOR
      to avoid SEGV.


  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=13864&r2=13863
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/thread.c?r1=13864&r2=13863

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 13863)
+++ ChangeLog	(revision 13864)
@@ -1,3 +1,8 @@
+Sat Nov 10 17:27:55 2007  Shugo Maeda  <shugo@r...>
+
+	* 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@s...>
 
 	* lib/rubygems: Import RubyGems revision 1493.
Index: thread.c
===================================================================
--- thread.c	(revision 13863)
+++ thread.c	(revision 13864)
@@ -2890,10 +2890,20 @@
     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));
 }

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml

[前][次][番号順一覧][スレッド一覧]