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

ruby-changes:38031

From: nobu <ko1@a...>
Date: Sun, 29 Mar 2015 13:50:17 +0900 (JST)
Subject: [ruby-changes:38031] nobu:r50112 (trunk): proc.c: check iseq before replication

nobu	2015-03-29 13:49:57 +0900 (Sun, 29 Mar 2015)

  New Revision: 50112

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=50112

  Log:
    proc.c: check iseq before replication
    
    * proc.c (proc_binding): do not replicate when iseq not found as
      rb_method_get_iseq() can return NULL.
      [ruby-core:68673] [Bug #11012]

  Modified files:
    trunk/proc.c
Index: proc.c
===================================================================
--- proc.c	(revision 50111)
+++ proc.c	(revision 50112)
@@ -2507,7 +2507,7 @@ proc_binding(VALUE self) https://github.com/ruby/ruby/blob/trunk/proc.c#L2507
 	}
 	iseq = rb_method_get_iseq((VALUE)((struct vm_ifunc *)iseq)->data);
 	GetEnvPtr(envval, env);
-	if (env->local_size < iseq->local_size) {
+	if (iseq && env->local_size < iseq->local_size) {
 	    int prev_local_size = env->local_size;
 	    int local_size = iseq->local_size;
 	    VALUE newenvval = TypedData_Wrap_Struct(RBASIC_CLASS(envval), RTYPEDDATA_TYPE(envval), 0);

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

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