summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans de Graaff <hans@degraaff.org>2011-07-22 12:11:54 +0200
committerHans de Graaff <hans@degraaff.org>2011-07-22 12:11:54 +0200
commit2426b59804ed9048093489f99fa32475ae9b3b8c (patch)
tree7c16d24ad92141a5b48e1eb0546d82e3c48ec2e0 /patchsets/patches-1.8.7_p334-r1
parentSupport prefix as reported in https://bugs.gentoo.org/361855 (diff)
downloadruby-scripts-2426b59804ed9048093489f99fa32475ae9b3b8c.tar.gz
ruby-scripts-2426b59804ed9048093489f99fa32475ae9b3b8c.tar.bz2
ruby-scripts-2426b59804ed9048093489f99fa32475ae9b3b8c.zip
Add patches for ruby-1.8.7_p334-r1 that were not committed.
Diffstat (limited to 'patchsets/patches-1.8.7_p334-r1')
-rw-r--r--patchsets/patches-1.8.7_p334-r1/001_memory_leak.patch59
-rw-r--r--patchsets/patches-1.8.7_p334-r1/002_mkconfig.patch16
-rw-r--r--patchsets/patches-1.8.7_p334-r1/003_mkmf-parallel-install.patch16
-rw-r--r--patchsets/patches-1.8.7_p334-r1/004_berkdb-5.0.patch13
-rw-r--r--patchsets/patches-1.8.7_p334-r1/007_no-undefined-ext.patch13
-rw-r--r--patchsets/patches-1.8.7_p334-r1/013_CVE-2011-0188.patch14
-rw-r--r--patchsets/patches-1.8.7_p334-r1/series6
7 files changed, 137 insertions, 0 deletions
diff --git a/patchsets/patches-1.8.7_p334-r1/001_memory_leak.patch b/patchsets/patches-1.8.7_p334-r1/001_memory_leak.patch
new file mode 100644
index 0000000..98edae0
--- /dev/null
+++ b/patchsets/patches-1.8.7_p334-r1/001_memory_leak.patch
@@ -0,0 +1,59 @@
+Index: ruby-1.8.7-p299/ext/dl/handle.c
+===================================================================
+--- ruby-1.8.7-p299.orig/ext/dl/handle.c
++++ ruby-1.8.7-p299/ext/dl/handle.c
+@@ -10,9 +10,12 @@ VALUE rb_cDLHandle;
+ void
+ dlhandle_free(struct dl_handle *dlhandle)
+ {
++ if (!dlhandle)
++ return;
+ if (dlhandle->ptr && dlhandle->open && dlhandle->enable_close) {
+ dlclose(dlhandle->ptr);
+ }
++ dlfree(dlhandle);
+ }
+
+ VALUE
+Index: ruby-1.8.7-p299/ext/dl/ptr.c
+===================================================================
+--- ruby-1.8.7-p299.orig/ext/dl/ptr.c
++++ ruby-1.8.7-p299/ext/dl/ptr.c
+@@ -45,6 +45,8 @@ rb_dlmem_aref(void *ptr)
+ void
+ dlptr_free(struct ptr_data *data)
+ {
++ if (!data)
++ return;
+ if (data->ptr) {
+ DEBUG_CODE({
+ printf("dlptr_free(): removing the pointer `0x%x' from the MemorySpace\n",
+@@ -61,6 +63,7 @@ dlptr_free(struct ptr_data *data)
+ if (data->stype) dlfree(data->stype);
+ if (data->ssize) dlfree(data->ssize);
+ if (data->ids) dlfree(data->ids);
++ dlfree(data);
+ }
+
+ void
+Index: ruby-1.8.7-p299/ext/dl/sym.c
+===================================================================
+--- ruby-1.8.7-p299.orig/ext/dl/sym.c
++++ ruby-1.8.7-p299/ext/dl/sym.c
+@@ -57,6 +57,8 @@ char2type(int ch)
+ void
+ dlsym_free(struct sym_data *data)
+ {
++ if(!data)
++ return;
+ if( data->name ){
+ DEBUG_CODE({
+ printf("dlsym_free(): free(data->name:%s)\n",data->name);
+@@ -69,6 +71,7 @@ dlsym_free(struct sym_data *data)
+ });
+ free(data->type);
+ }
++ dlfree(data);
+ }
+
+ VALUE
diff --git a/patchsets/patches-1.8.7_p334-r1/002_mkconfig.patch b/patchsets/patches-1.8.7_p334-r1/002_mkconfig.patch
new file mode 100644
index 0000000..52631e0
--- /dev/null
+++ b/patchsets/patches-1.8.7_p334-r1/002_mkconfig.patch
@@ -0,0 +1,16 @@
+Fix for mkconfig to be able to handle empty continued lines.
+Patch from [ruby-core:20420] via bug 234877.
+
+Index: ruby-1.8.7-p299/mkconfig.rb
+===================================================================
+--- ruby-1.8.7-p299.orig/mkconfig.rb
++++ ruby-1.8.7-p299/mkconfig.rb
+@@ -55,7 +55,7 @@ File.foreach "config.status" do |line|
+ continued_name = name
+ next
+ end
+- when /^"(.+)"\s*(\\)?$/
++ when /^"(.*)"\s*(\\)?$/
+ if continued_line
+ continued_line << $1
+ unless $2
diff --git a/patchsets/patches-1.8.7_p334-r1/003_mkmf-parallel-install.patch b/patchsets/patches-1.8.7_p334-r1/003_mkmf-parallel-install.patch
new file mode 100644
index 0000000..9ecdc9b
--- /dev/null
+++ b/patchsets/patches-1.8.7_p334-r1/003_mkmf-parallel-install.patch
@@ -0,0 +1,16 @@
+ Patch for bug 239101 by Matsuu Takuto, via Redmine issue 1337 (yes, really).
+ Backported for 1.8.* by Alex Legler.
+
+Index: ruby-1.8.7-p299/lib/mkmf.rb
+===================================================================
+--- ruby-1.8.7-p299.orig/lib/mkmf.rb
++++ ruby-1.8.7-p299/lib/mkmf.rb
+@@ -1523,7 +1523,7 @@ static: $(STATIC_LIB)#{$extout ? " inst
+ dest = "#{dir}/#{f}"
+ mfile.puts dir, "install-so: #{dest}"
+ unless $extout
+- mfile.print "#{dest}: #{f}\n"
++ mfile.print "#{dest}: #{dir} #{f}\n"
+ if (sep = config_string('BUILD_FILE_SEPARATOR'))
+ f.gsub!("/", sep)
+ dir.gsub!("/", sep)
diff --git a/patchsets/patches-1.8.7_p334-r1/004_berkdb-5.0.patch b/patchsets/patches-1.8.7_p334-r1/004_berkdb-5.0.patch
new file mode 100644
index 0000000..2516cd3
--- /dev/null
+++ b/patchsets/patches-1.8.7_p334-r1/004_berkdb-5.0.patch
@@ -0,0 +1,13 @@
+Index: ruby-1.8.7-p299/ext/dbm/extconf.rb
+===================================================================
+--- ruby-1.8.7-p299.orig/ext/dbm/extconf.rb
++++ ruby-1.8.7-p299/ext/dbm/extconf.rb
+@@ -26,7 +26,7 @@ def headers.db_check(db)
+ case db
+ when /^db2?$/
+ db_prefix = "__db_n"
+- hsearch = "-DDB_DBM_HSEARCH "
++ hsearch = "-DDB_DBM_HSEARCH -DHAVE_DBM "
+ when "gdbm"
+ have_gdbm = true
+ when "gdbm_compat"
diff --git a/patchsets/patches-1.8.7_p334-r1/007_no-undefined-ext.patch b/patchsets/patches-1.8.7_p334-r1/007_no-undefined-ext.patch
new file mode 100644
index 0000000..41a7ddb
--- /dev/null
+++ b/patchsets/patches-1.8.7_p334-r1/007_no-undefined-ext.patch
@@ -0,0 +1,13 @@
+Index: ruby-1.8.7-p299/configure.in
+===================================================================
+--- ruby-1.8.7-p299.orig/configure.in
++++ ruby-1.8.7-p299/configure.in
+@@ -1223,7 +1223,7 @@ if test "$with_dln_a_out" != yes; then
+ linux* | gnu* | k*bsd*-gnu | netbsd* | bsdi*)
+ : ${LDSHARED='${CC} -shared'}
+ if test "$rb_cv_binary_elf" = yes; then
+- LDFLAGS="$LDFLAGS -Wl,-export-dynamic"
++ LDFLAGS="$LDFLAGS -Wl,-export-dynamic -Wl,--no-undefined"
+ fi
+ rb_cv_dlopen=yes ;;
+ interix*) : ${LDSHARED="$CC -shared"}
diff --git a/patchsets/patches-1.8.7_p334-r1/013_CVE-2011-0188.patch b/patchsets/patches-1.8.7_p334-r1/013_CVE-2011-0188.patch
new file mode 100644
index 0000000..9e29917
--- /dev/null
+++ b/patchsets/patches-1.8.7_p334-r1/013_CVE-2011-0188.patch
@@ -0,0 +1,14 @@
+Patch backported from upstream revision 30993 by a3li@gentoo.org.
+
+diff -Naur ruby-1.8.7-p334.orig/ext/bigdecimal/bigdecimal.c ruby-1.8.7-p334/ext/bigdecimal/bigdecimal.c
+--- ruby-1.8.7-p334.orig/ext/bigdecimal/bigdecimal.c 2010-06-08 09:49:18.000000000 +0200
++++ ruby-1.8.7-p334/ext/bigdecimal/bigdecimal.c 2011-05-31 20:53:23.268999218 +0200
+@@ -2032,7 +2032,7 @@
+ VP_EXPORT void *
+ VpMemAlloc(U_LONG mb)
+ {
+- void *p = xmalloc((unsigned int)mb);
++ void *p = xmalloc(mb);
+ if(!p) {
+ VpException(VP_EXCEPTION_MEMORY,"failed to allocate memory",1);
+ }
diff --git a/patchsets/patches-1.8.7_p334-r1/series b/patchsets/patches-1.8.7_p334-r1/series
new file mode 100644
index 0000000..1c53da6
--- /dev/null
+++ b/patchsets/patches-1.8.7_p334-r1/series
@@ -0,0 +1,6 @@
+001_memory_leak.patch
+002_mkconfig.patch
+003_mkmf-parallel-install.patch
+004_berkdb-5.0.patch
+007_no-undefined-ext.patch
+013_CVE-2011-0188.patch