Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 64214 Details for
Bug 85718
sys-libs/glibc: iconvconfig requires executable stack which breaks localedef under PaX kernels
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
De-trampoline iconvconfig
glibc-iconvnotramp.diff (text/plain), 2.29 KB, created by
Kevin F. Quinn (RETIRED)
on 2005-07-24 14:59:18 UTC
(
hide
)
Description:
De-trampoline iconvconfig
Filename:
MIME Type:
Creator:
Kevin F. Quinn (RETIRED)
Created:
2005-07-24 14:59:18 UTC
Size:
2.29 KB
patch
obsolete
>--- iconv/iconvconfig.c.orig 2005-07-24 22:12:13.000000000 +0200 >+++ iconv/iconvconfig.c 2005-07-24 22:15:49.000000000 +0200 >@@ -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)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 85718
: 64214