[101255] trunk/dports/lang/ruby19

kimuraw at macports.org kimuraw at macports.org
Mon Jan 7 05:06:41 PST 2013


Revision: 101255
          https://trac.macports.org/changeset/101255
Author:   kimuraw at macports.org
Date:     2013-01-07 05:06:41 -0800 (Mon, 07 Jan 2013)
Log Message:
-----------
lang/ruby19: add a patch to fix segmentation fault.
    see https://bugs.ruby-lang.org/issues/7658 (ja)

Modified Paths:
--------------
    trunk/dports/lang/ruby19/Portfile

Added Paths:
-----------
    trunk/dports/lang/ruby19/files/patch-vm.c.diff

Modified: trunk/dports/lang/ruby19/Portfile
===================================================================
--- trunk/dports/lang/ruby19/Portfile	2013-01-07 13:05:31 UTC (rev 101254)
+++ trunk/dports/lang/ruby19/Portfile	2013-01-07 13:06:41 UTC (rev 101255)
@@ -4,7 +4,7 @@
 
 name				ruby19
 version				1.9.3-p362
-revision			0
+revision			1
 
 categories			lang ruby
 maintainers			kimuraw openmaintainer
@@ -46,7 +46,10 @@
 # lib-rubygems-specification.rb: fix 'Invalid gemspec in [... json-1.6.1.gemspec]: invalid date
 #     format in specification: "2011-09-18 00:00:00.000000000Z"'
 #     https://github.com/rubygems/rubygems/pull/196
-patchfiles			patch-lib-rubygems-specification.rb.diff
+# vm.c: fix Segmentation Fault of 1.9.3-p362.
+#     https://bugs.ruby-lang.org/issues/7658
+patchfiles			patch-lib-rubygems-specification.rb.diff \
+					patch-vm.c.diff
 
 # ruby-1.9.3 supports Xcode-4.2 clang and gcc-4.2.
 # ruby built with llvm-gcc will be broken.

Added: trunk/dports/lang/ruby19/files/patch-vm.c.diff
===================================================================
--- trunk/dports/lang/ruby19/files/patch-vm.c.diff	                        (rev 0)
+++ trunk/dports/lang/ruby19/files/patch-vm.c.diff	2013-01-07 13:06:41 UTC (rev 101255)
@@ -0,0 +1,40 @@
+Index: vm.c
+===================================================================
+--- vm.c	(revision 38725)
++++ vm.c	(revision 38726)
+@@ -468,10 +468,18 @@
+ }
+ 
+ static VALUE vm_make_proc_from_block(rb_thread_t *th, rb_block_t *block);
++static VALUE vm_make_env_object(rb_thread_t * th, rb_control_frame_t *cfp, VALUE *blockprocptr);
+ 
+ VALUE
+ rb_vm_make_env_object(rb_thread_t * th, rb_control_frame_t *cfp)
+ {
++    VALUE blockprocval;
++    return vm_make_env_object(th, cfp, &blockprocval);
++}
++
++static VALUE
++vm_make_env_object(rb_thread_t *th, rb_control_frame_t *cfp, VALUE *blockprocptr)
++{
+     VALUE envval;
+     VALUE *lfp;
+     rb_block_t *blockptr;
+@@ -489,6 +497,7 @@
+ 	rb_proc_t *p;
+ 	GetProcPtr(blockprocval, p);
+ 	lfp[0] = GC_GUARDED_PTR(&p->block);
++	*blockprocptr = blockprocval;
+     }
+ 
+     envval = vm_make_env_each(th, cfp, cfp->dfp, cfp->lfp);
+@@ -559,7 +568,7 @@
+ 	rb_bug("rb_vm_make_proc: Proc value is already created.");
+     }
+ 
+-    envval = rb_vm_make_env_object(th, cfp);
++    envval = vm_make_env_object(th, cfp, &blockprocval);
+ 
+     if (PROCDEBUG) {
+ 	check_env_value(envval);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130107/5c3e0186/attachment.html>


More information about the macports-changes mailing list