r1874 - in glibc-package: branches/glibc-2.5/debian branches/glibc-2.5/debian/patches branches/glibc-2.5/debian/patches/any trunk/debian trunk/debian/patches trunk/debian/patches/any
Author: aurel32
Date: 2006-11-04 19:08:44 +0100 (Sat, 04 Nov 2006)
New Revision: 1874
Added:
glibc-package/branches/glibc-2.5/debian/patches/any/local-iconv-fix-trampoline.diff
glibc-package/trunk/debian/patches/any/local-iconv-fix-trampoline.diff
Modified:
glibc-package/branches/glibc-2.5/debian/changelog
glibc-package/branches/glibc-2.5/debian/patches/series
glibc-package/trunk/debian/changelog
glibc-package/trunk/debian/patches/series
Log:
* any/local-iconv-fix-trampoline.diff: new patch (fix iconvconfig segfault
when run under exec-shield, PaX or similar) from hlfs. Closes: #397020.
Modified: glibc-package/branches/glibc-2.5/debian/changelog
===================================================================
--- glibc-package/branches/glibc-2.5/debian/changelog 2006-11-04 17:49:11 UTC (rev 1873)
+++ glibc-package/branches/glibc-2.5/debian/changelog 2006-11-04 18:08:44 UTC (rev 1874)
@@ -231,6 +231,13 @@
-- Clint Adams <schizo@debian.org> Sun, 28 May 2006 03:28:14 +0200
+glibc (2.3.6.ds1-8) unstable; urgency=low
+
+ * any/local-iconv-fix-trampoline.diff: new patch (fix iconvconfig segfault
+ when run under exec-shield, PaX or similar) from hlfs. Closes: #397020.
+
+ -- Aurelien Jarno <aurel32@debian.org> Sat, 4 Nov 2006 19:00:35 +0100
+
glibc (2.3.6.ds1-7) unstable; urgency=low
[ Aurelien Jarno ]
Added: glibc-package/branches/glibc-2.5/debian/patches/any/local-iconv-fix-trampoline.diff
===================================================================
--- glibc-package/branches/glibc-2.5/debian/patches/any/local-iconv-fix-trampoline.diff 2006-11-04 17:49:11 UTC (rev 1873)
+++ glibc-package/branches/glibc-2.5/debian/patches/any/local-iconv-fix-trampoline.diff 2006-11-04 18:08:44 UTC (rev 1874)
@@ -0,0 +1,88 @@
+# DP: Description: Fix iconvconfig segfault when run under exec-shield,
+# PaX or similar. (#397020)
+# DP: Patch Author: Robert Connolly <robert at linuxfromscratch dot org>
+# DP: Upstream status: rejected (non-upstream kernels not supported)
+# DP: Date: 2006-10-11
+
+diff -Naur glibc-2.5.orig/iconv/iconvconfig.c glibc-2.5/iconv/iconvconfig.c
+--- glibc-2.5.orig/iconv/iconvconfig.c 2006-09-21 03:57:30.000000000 +0000
++++ glibc-2.5/iconv/iconvconfig.c 2006-10-11 21:36:18.000000000 +0000
+@@ -1011,6 +1011,38 @@
+ module name offset
+ (following last entry with step count 0)
+ */
++
++/* Function to insert the names. */
++/* Made non-nested to avoid trampoline.
++ * Requires hash_table and hash_size to be made global,
++ * but since the caller (write_output) is called once
++ * in the only thread there should be no problem */
++static struct hash_entry *hash_table;
++static size_t hash_size;
++static void
++name_insert (const void *nodep, VISIT value, int level)
++ {
++ struct name *name;
++ unsigned int idx;
++ unsigned int hval2;
++
++ if (value != leaf && value != postorder)
++ return;
++
++ name = *(struct name **) nodep;
++ idx = name->hashval % hash_size;
++ hval2 = 1 + name->hashval % (hash_size - 2);
++
++ while (hash_table[idx].string_offset != 0)
++ if ((idx += hval2) >= hash_size)
++ idx -= hash_size;
++
++ hash_table[idx].string_offset = strtaboffset (name->strent);
++
++ assert (name->module_idx != -1);
++ hash_table[idx].module_idx = name->module_idx;
++ }
++
+ static int
+ write_output (void)
+ {
+@@ -1018,8 +1050,6 @@
+ char *string_table;
+ size_t string_table_size;
+ struct gconvcache_header header;
+- struct hash_entry *hash_table;
+- size_t hash_size;
+ struct module_entry *module_table;
+ char *extra_table;
+ char *cur_extra_table;
+@@ -1032,30 +1062,6 @@
+ char tmpfname[(output_file == NULL ? sizeof finalname : output_file_len + 1)
+ + strlen (".XXXXXX")];
+
+- /* Function to insert the names. */
+- auto void
+- name_insert (const void *nodep, VISIT value, int level)
+- {
+- struct name *name;
+- unsigned int idx;
+- unsigned int hval2;
+-
+- if (value != leaf && value != postorder)
+- return;
+-
+- name = *(struct name **) nodep;
+- idx = name->hashval % hash_size;
+- hval2 = 1 + name->hashval % (hash_size - 2);
+-
+- while (hash_table[idx].string_offset != 0)
+- if ((idx += hval2) >= hash_size)
+- idx -= hash_size;
+-
+- hash_table[idx].string_offset = strtaboffset (name->strent);
+-
+- assert (name->module_idx != -1);
+- hash_table[idx].module_idx = name->module_idx;
+- }
+
+ /* Open the output file. */
+ if (output_file == NULL)
Modified: glibc-package/branches/glibc-2.5/debian/patches/series
===================================================================
--- glibc-package/branches/glibc-2.5/debian/patches/series 2006-11-04 17:49:11 UTC (rev 1873)
+++ glibc-package/branches/glibc-2.5/debian/patches/series 2006-11-04 18:08:44 UTC (rev 1874)
@@ -97,6 +97,7 @@
any/local-forward-backward-collation.diff
any/local-gcc4-wcstol_l.diff -p1
#any/local-globfree-clear.diff -p1 # g: suspended
+any/local-iconv-fix-trampoline.diff -p1
any/local-ld-multiarch.diff -p1
any/local-ldd.diff -p0
any/local-ldso-disable-hwcap.diff -p0
Modified: glibc-package/trunk/debian/changelog
===================================================================
--- glibc-package/trunk/debian/changelog 2006-11-04 17:49:11 UTC (rev 1873)
+++ glibc-package/trunk/debian/changelog 2006-11-04 18:08:44 UTC (rev 1874)
@@ -1,3 +1,10 @@
+glibc (2.3.6.ds1-8) unstable; urgency=low
+
+ * any/local-iconv-fix-trampoline.diff: new patch (fix iconvconfig segfault
+ when run under exec-shield, PaX or similar) from hlfs. Closes: #397020.
+
+ -- Aurelien Jarno <aurel32@debian.org> Sat, 4 Nov 2006 19:00:35 +0100
+
glibc (2.3.6.ds1-7) unstable; urgency=low
[ Aurelien Jarno ]
Added: glibc-package/trunk/debian/patches/any/local-iconv-fix-trampoline.diff
===================================================================
--- glibc-package/trunk/debian/patches/any/local-iconv-fix-trampoline.diff 2006-11-04 17:49:11 UTC (rev 1873)
+++ glibc-package/trunk/debian/patches/any/local-iconv-fix-trampoline.diff 2006-11-04 18:08:44 UTC (rev 1874)
@@ -0,0 +1,87 @@
+# DP: Description: Fix iconvconfig segfault when run under exec-shield,
+# PaX or similar. (#397020)
+# DP: Patch Author: Robert Connolly <robert at linuxfromscratch dot org>
+# DP: Upstream status: rejected (non-upstream kernels not supported)
+# DP: Date: 2006-07-19
+
+--- glibc-2.3.5/iconv/iconvconfig.c
++++ glibc-2.3.5/iconv/iconvconfig.c
+@@ -1013,6 +1013,38 @@
+ module name offset
+ (following last entry with step count 0)
+ */
++
++/* Function to insert the names. */
++/* Made non-nested to avoid trampoline.
++ * Requires hash_table and hash_size to be made global,
++ * but since the caller (write_output) is called once
++ * in the only thread there should be no problem */
++static struct hash_entry *hash_table;
++static size_t hash_size;
++static void
++name_insert (const void *nodep, VISIT value, int level)
++ {
++ struct name *name;
++ unsigned int idx;
++ unsigned int hval2;
++
++ if (value != leaf && value != postorder)
++ return;
++
++ name = *(struct name **) nodep;
++ idx = name->hashval % hash_size;
++ hval2 = 1 + name->hashval % (hash_size - 2);
++
++ while (hash_table[idx].string_offset != 0)
++ if ((idx += hval2) >= hash_size)
++ idx -= hash_size;
++
++ hash_table[idx].string_offset = strtaboffset (name->strent);
++
++ assert (name->module_idx != -1);
++ hash_table[idx].module_idx = name->module_idx;
++ }
++
+ static int
+ write_output (void)
+ {
+@@ -1020,8 +1052,6 @@
+ char *string_table;
+ size_t string_table_size;
+ struct gconvcache_header header;
+- struct hash_entry *hash_table;
+- size_t hash_size;
+ struct module_entry *module_table;
+ char *extra_table;
+ char *cur_extra_table;
+@@ -1034,30 +1064,6 @@
+ char tmpfname[(output_file == NULL ? sizeof finalname : output_file_len + 1)
+ + strlen (".XXXXXX")];
+
+- /* Function to insert the names. */
+- auto void
+- name_insert (const void *nodep, VISIT value, int level)
+- {
+- struct name *name;
+- unsigned int idx;
+- unsigned int hval2;
+-
+- if (value != leaf && value != postorder)
+- return;
+-
+- name = *(struct name **) nodep;
+- idx = name->hashval % hash_size;
+- hval2 = 1 + name->hashval % (hash_size - 2);
+-
+- while (hash_table[idx].string_offset != 0)
+- if ((idx += hval2) >= hash_size)
+- idx -= hash_size;
+-
+- hash_table[idx].string_offset = strtaboffset (name->strent);
+-
+- assert (name->module_idx != -1);
+- hash_table[idx].module_idx = name->module_idx;
+- }
+
+ /* Open the output file. */
+ if (output_file == NULL)
Modified: glibc-package/trunk/debian/patches/series
===================================================================
--- glibc-package/trunk/debian/patches/series 2006-11-04 17:49:11 UTC (rev 1873)
+++ glibc-package/trunk/debian/patches/series 2006-11-04 18:08:44 UTC (rev 1874)
@@ -158,6 +158,7 @@
any/local-gcc4-elf.diff -p0
any/local-gcc4-wcstol_l.diff -p1
#any/local-globfree-clear.diff -p1 # g: suspended
+any/local-iconv-fix-trampoline.diff -p1
any/local-kernel-features.diff -p0
any/local-ld-multiarch.diff -p1
any/local-ldd.diff -p0
Reply to: