Re: Configure problem when compiling with -D_FORTIFY_SOURCE

2007-09-15 Thread Greg Schafer
Bruno Haible wrote: > It could be that the buffer that is too small is this 'buf' here, not > something in glibc. Does the buffer overflow persist if you increase > its size from 100 to 100, and/or if you use asprintf instead of sprintf? Size of 1 seems to work. Size of 1000 doesn't. Usin

Re: Configure problem when compiling with -D_FORTIFY_SOURCE

2007-09-15 Thread Bruno Haible
Greg Schafer wrote: > Posting here for review first: Thanks. > $ cat foo.c > #include > > static char buf[100]; > int main () > { > # define LDBL80_WORDS(exponent,manthi,mantlo) { mantlo, manthi, > exponent } > { /* Pseudo-Infinity. */ > static union { unsigned int word[4]; long d

Re: Configure problem when compiling with -D_FORTIFY_SOURCE

2007-09-15 Thread Greg Schafer
Bruno Haible wrote: > This configure test and how glibc should handle printing of random bitpatterns > was subject of a bug report > http://sourceware.org/bugzilla/show_bug.cgi?id=4586 > and a lengthy discussion. The bug was fixed by Jakub Jelinek in July 2007; > the fix should be contained in g

Re: aliasing "sed" to "sed --posix"

2007-09-15 Thread Bruno Haible
Bruce Korb wrote on 2007-08-06: > Well, I knew ahead of writing the script that unless the shopt > expand_aliases were turned on that they would not work. I had > stumbled into this before. I experimented with aliasing "exit" > because it would have a dramatic effect on the execution flow. :) > S

new module 'areadlink'

2007-09-15 Thread Bruno Haible
Hi, Here is the variant of readlink that allocates memory for the result but does not exit in case of "out of memory" situation. Suggested by Jim. This is mostly code duplication with 'xreadlink' for now; the next patch will change xreadlink to use areadlink. Comments, objections? Bruno 2007-

Re: Configure problem when compiling with -D_FORTIFY_SOURCE

2007-09-15 Thread Bruno Haible
Alf mel wrote: > > While trying out the lastest offerings in Glibc (2.6.1) and GCC (4.2.1) via > > the DIY-Linux project (www.diy-linux-.org), I encountered the following > > error in the configure script when compiled with > > > > CFLAGS="-O2 -fstack-protector -D_FORTIFY_SOURCE=2". > > > > Her

Re: Configure problem when compiling with -D_FORTIFY_SOURCE

2007-09-15 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Alf mel on 9/15/2007 8:26 AM: > While trying out the lastest offerings in Glibc (2.6.1) and GCC (4.2.1) via > the DIY-Linux project (www.diy-linux-.org), I encountered the following > error in the configure script when compiled with > >