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

ruby-changes:36515

From: normal <ko1@a...>
Date: Thu, 27 Nov 2014 11:48:29 +0900 (JST)
Subject: [ruby-changes:36515] normal:r48597 (trunk): iseq.c (iseq_data_to_ary): add missing GC guard

normal	2014-11-27 11:48:14 +0900 (Thu, 27 Nov 2014)

  New Revision: 48597

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

  Log:
    iseq.c (iseq_data_to_ary): add missing GC guard
    
    It seems possible for a compiler to optimize away nbody
    because we only access it via RARRAY_AREF and RARRAY_LEN
    macros.

  Modified files:
    trunk/ChangeLog
    trunk/iseq.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 48596)
+++ ChangeLog	(revision 48597)
@@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Thu Nov 27 11:45:33 2014  Eric Wong  <e@8...>
+
+	* iseq.c (iseq_data_to_ary): add missing GC guard
+
 Thu Nov 27 10:51:59 2014  Koichi Sasada  <ko1@a...>
 
 	* vm_core.h: add rb_thread_t::local_storage_recursive_hash
Index: iseq.c
===================================================================
--- iseq.c	(revision 48596)
+++ iseq.c	(revision 48597)
@@ -1889,6 +1889,7 @@ iseq_data_to_ary(rb_iseq_t *iseq) https://github.com/ruby/ruby/blob/trunk/iseq.c#L1889
 	rb_ary_push(body, ary);
 	pos += RARRAY_LENINT(ary); /* reject too huge data */
     }
+    RB_GC_GUARD(nbody);
 
     st_free_table(labels_table);
 

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

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