strstr (was: test-memchr crash)

2009-06-16 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Eric Blake on 6/16/2009 6:16 AM: > Oh. That's because your strstr is already non-linear (your glibc 2.7 is > older than when they picked up my strstr implementation, around Feb 2008 > and glibc 2.9). So there's only a narrow window of ti

Re: getpagesize on mingw

2009-06-16 Thread Bruno Haible
Hi Sam, > where is the prototype for the replacement getpagesize()? It is in the generated file. > it would make sense to include unistd.h, but it is not generated on win32. It should be generated on all platforms. modules/unistd contains the line BUILT_SOURCES += unistd.h which instructs

Re: [PATCH] hash: declare some functions with the warn_unused_result attribute

2009-06-16 Thread Eric Blake
Eric Blake byu.net> writes: > Indeed, if you are frequently calling allocate_entry, the cost of malloc'ing > lots of small objects is measurably worse than using an obstack to malloc large > chunks and carve off entries as needed. In other words, it's not the speedup > from freeing multiple

getpagesize on mingw

2009-06-16 Thread Sam Steingold
Hi, updating gnulib files in clisp pulled in getpagesize.m4 and getpagesize.m4, so I decided to use them instead of the traditional clisp code. my question is: where is the prototype for the replacement getpagesize()? it would make sense to include unistd.h, but it is not generated on win32. also,

Re: errors building m4 on interix/sfu/sua

2009-06-16 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 [please don't top-post on technical lists] According to jay.kr...@cornell.edu on 6/16/2009 8:08 AM: > Isn't just ifdef estale around use of it sufficient? Or is there some > chance of const int or such? That misses the whole point of the gnulib errno

Re: [PATCH] hash: declare some functions with the warn_unused_result attribute

2009-06-16 Thread Jim Meyering
Eric Blake wrote: > Jim Meyering meyering.net> writes: ... > My code inspection didn't turn up obvious problems, but I have not yet tested > with USE_OBSTACK either, so I wouldn't be surprised to find bit rot. If we do > get it working, would it be worth making the use of obstacks a runtime > de

Re: [PATCH] hash: declare some functions with the warn_unused_result attribute

2009-06-16 Thread Ben Pfaff
Eric Blake writes: > There might also be alternative implementations possible with > better performance. For example, instead of malloc'ing free > entries one at a time and tracking bucket overflows as pointers > to malloc'd objects, we could instead malloc/realloc an array > of overflows, with

Re: [PATCH] hash: declare some functions with the warn_unused_result attribute

2009-06-16 Thread Eric Blake
Jim Meyering meyering.net> writes: > Long ago (like 12-15 years), in an application that made very heavy use > of hash tables, the obstack code provided a large performance benefit. Indeed, if you are frequently calling allocate_entry, the cost of malloc'ing lots of small objects is measurably

Re: [PATCH] hash: declare some functions with the warn_unused_result attribute

2009-06-16 Thread Jim Meyering
Eric Blake wrote: > Eric Blake byu.net> writes: >> Subject: [PATCH] hash: improve memory management >> >> * lib/hash.c (hash_delete): Free entries if resize failed. >> (hash_insert): Don't leave entry on table when returning failure. >> (hash_rehash): Avoid memory leak, by guaranteeing that we won

Re: errors building m4 on interix/sfu/sua

2009-06-16 Thread jay . krell
Isn't just ifdef estale around use of it sufficient? Or is there some chance of const int or such? Given that const int cannot be switched on in C, they mustall be defines and simple ifdef suffices and is fully portable no need for configury? Right? Old versions: just showing lame optio

Re: [PATCH] hash: declare some functions with the warn_unused_result attribute

2009-06-16 Thread Eric Blake
Eric Blake byu.net> writes: > Subject: [PATCH] hash: improve memory management > > * lib/hash.c (hash_delete): Free entries if resize failed. > (hash_insert): Don't leave entry on table when returning failure. > (hash_rehash): Avoid memory leak, by guaranteeing that we won't > allocate once we s

Re: gl_LIBSIGSEGV is broken

2009-06-16 Thread Sam Steingold
On Mon, Jun 15, 2009 at 6:52 PM, Bruno Haible wrote: > Sam Steingold wrote: >> I just upgraded clisp to libsigsegv.m4 serial 4 > > Did you do a "make distclean; ./configure" after doing so? yes, of course. >> and now LIBSIGSEGV is not set right: >> >> config.status: >> >> before: >> $ grep -i sig

Re: [PATCH] hash: declare some functions with the warn_unused_result attribute

2009-06-16 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Eric Blake on 6/15/2009 5:17 PM: >>> Additionally, it looks like hash_rehash has a memory leak - if new_table >>> is allocated, but we later fail to allocate new_entry, the function >>> returns immediately without reclaiming new_table. Wh

interactive self-test: idpriv-drop*

2009-06-16 Thread Simon Josefsson
Bruno, the test-idpriv-droptemp.sh and test-idpriv-drop.sh scripts call sudo/su which typically hangs querying for a password. This breaks build robots that run the job in the background. How about making these conditional on whether the user running the self-test is root? Or see the approach us

Re: test-memchr crash

2009-06-16 Thread Simon Josefsson
Simon Josefsson writes: > I have started a build of gnulib on that host, and it will run daily > from now on. First build was successful: http://autobuild.josefsson.org/gnulib/log-200906160813476137000.txt Btw, speaking generally, powerpc-apple-darwin8.11.0 is close to passing a build. The onl

Re: test-memchr crash

2009-06-16 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Simon Josefsson on 6/16/2009 1:30 AM: > checking whether strstr works in linear time... no > ... > PASS: test-strstr > > I checked, and the gnulib strstr replacement is used. Oh. That's because your strstr is already non-linear (your gl

Re: errors building m4 on interix/sfu/sua

2009-06-16 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 [adding bug-gnulib] According to Jay on 6/16/2009 1:04 AM: > m4-1.4.13 > spawni.c: In function `gl_posix_spawn_internal': > spawni.c:233: warning: implicit declaration of function `seteuid' > spawni.c:234: warning: implicit declaration of function `se

Re: test-memchr crash

2009-06-16 Thread Simon Josefsson
Eric Blake writes: > According to Simon Josefsson on 6/13/2009 10:43 AM: >>> Looks pretty much like one of the glibc memchr bugs that were recently >>> fixed: >>> >> >> I'm not sure, the machine where this fails runs glibc 2.7 and the bug