aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/ruby/ruby/prevent-gc.patch
diff options
context:
space:
mode:
authorJoshua Lock <joshua.g.lock@intel.com>2017-10-27 15:49:41 +0100
committerArmin Kuster <akuster808@gmail.com>2018-02-22 11:09:54 -0800
commitd56433b7f03476f0efdcfa635240feace1084cc7 (patch)
tree2da34f219ba027045fe4a509ce81ca2a4a68c2d7 /meta/recipes-devtools/ruby/ruby/prevent-gc.patch
parent4eb483430e016fa4728805460efbeea47d15951b (diff)
downloadopenembedded-core-contrib-d56433b7f03476f0efdcfa635240feace1084cc7.tar.gz
ruby: fix build of ruby-native with gcc7
Marsalling is broken when ruby-2.2.x is built with gcc7, backport the change fix in Ruby SVN r57410 to apply to ruby 2.2.5: https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=57410 Fixes [YOCTO #12271] Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Armin Kuster <akuster808@gmail.com> (cherry picked from commit b9de98cdc816904583970369848181c2c79f1dc5) Signed-off-by: Armin Kuster <akuster808@gmail.com>
Diffstat (limited to 'meta/recipes-devtools/ruby/ruby/prevent-gc.patch')
-rw-r--r--meta/recipes-devtools/ruby/ruby/prevent-gc.patch32
1 files changed, 32 insertions, 0 deletions
diff --git a/meta/recipes-devtools/ruby/ruby/prevent-gc.patch b/meta/recipes-devtools/ruby/ruby/prevent-gc.patch
new file mode 100644
index 0000000000..2eaa955fba
--- /dev/null
+++ b/meta/recipes-devtools/ruby/ruby/prevent-gc.patch
@@ -0,0 +1,32 @@
+Fix marshaling with gcc7. Based on upstream revision 57410:
+https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=57410
+https://github.com/ruby/ruby/commit/7c1b30a602ab109d8d5388d7dfb3c5b180ba24e1
+https://bugs.ruby-lang.org/issues/13150
+
+with the upstream patches intent ported to Ruby 2.2.5
+
+Upstream-Status: Backport
+
+Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
+
+Index: ruby-2.2.5/marshal.c
+===================================================================
+--- ruby-2.2.5.orig/marshal.c
++++ ruby-2.2.5/marshal.c
+@@ -17,7 +17,6 @@
+ #include "ruby/io.h"
+ #include "ruby/st.h"
+ #include "ruby/util.h"
+-
+ #include <math.h>
+ #ifdef HAVE_FLOAT_H
+ #include <float.h>
+@@ -985,7 +984,7 @@ marshal_dump(int argc, VALUE *argv)
+ VALUE obj, port, a1, a2;
+ int limit = -1;
+ struct dump_arg *arg;
+- VALUE wrapper; /* used to avoid memory leak in case of exception */
++ volatile VALUE wrapper; /* used to avoid memory leak in case of exception */
+
+ port = Qnil;
+ rb_scan_args(argc, argv, "12", &obj, &a1, &a2);