Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 126164 - Error in glibc fnmatch patch causing seg faults in ld.
Summary: Error in glibc fnmatch patch causing seg faults in ld.
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-14 07:53 UTC by Richard Smith
Modified: 2006-03-14 16:35 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch against 5021_all_2.3.6-fnmatch.patch (fnmatch-patch.patch,873 bytes, patch)
2006-03-14 07:56 UTC, Richard Smith
Details | Diff
Patch against patched glibc (fnmatch.patch,439 bytes, patch)
2006-03-14 08:00 UTC, Richard Smith
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Smith 2006-03-14 07:53:37 UTC
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.
Comment 1 Richard Smith 2006-03-14 07:56:27 UTC
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.
Comment 2 Richard Smith 2006-03-14 08:00:47 UTC
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.
Comment 3 SpanKY gentoo-dev 2006-03-14 16:06:47 UTC
yeah, that line should def not be removed ... seems whoever made the patch screwed it up as the original one doesnt remove that line ...
Comment 4 SpanKY gentoo-dev 2006-03-14 16:35:05 UTC
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 :)