Gentoo apply a patch, 5021_all_2.3.6-fnmatch.patch, as part of glibc-2.3.6-patches-1.8.tar.bz2. Amongst other things, this removes the following line from the fnmatch() function in posix/fnmatch.c: wstring = (wchar_t *) alloca ((n + 1) * sizeof (wchar_t)); This leaves the variable wstring uninitialised if strlen(string) >= 1024, which appears to cause of segfaults in GNU ld when heavily templated C++ results in very long ELF section names.
Created attachment 82101 [details, diff] Patch against 5021_all_2.3.6-fnmatch.patch This is a patch against /home/richard/fnmatch-patch.patch in glibc-2.3.6-patches-1.8.tar.bz2 which should fix this bug.
Created attachment 82103 [details, diff] Patch against patched glibc An alternative patch -- this one against glibc after the patches from glibc-2.3.6-patches-1.8.tar.bz2 have been applied. Not sure which is more convenient.
yeah, that line should def not be removed ... seems whoever made the patch screwed it up as the original one doesnt remove that line ...
ah, looks like the patch was taken from current suse patchset ... ive e-mailed one of their guys about the error and fixed our version will be in glibc-2.3.6-r4 / glibc-2.4-r1, thanks :)