Re: Why is `find -name '*.txt'` much slower than '*.txt' on glusterfs?

2018-09-23 Thread James Youngman
On Sun, Jan 28, 2018 at 6:57 PM Bernhard Voelker wrote: > On 01/27/2018 06:45 PM, Peng Yu wrote: > >> glusterfs doesn't provide D_TYPE information: > >> > >> getdents(4, {{d_ino=10054722685526780333, ..., d_type=DT_UNKNOWN} ... > >> > >> Nevertheless, it is strange that find calls newfstatat() al

Re: Would timevar be accepted in gnulib?

2018-09-23 Thread Bruno Haible
Hi Akim, > > But what about the list-of-lists use-case? ... > ... > DEFTIMEVAR (TV_FOO, "Foo phase") > DEFTIMEVAR (TV_FOO_BAR, "Foo: Bar phase") > DEFTIMEVAR (TV_FOO_BAZ, "Foo: Baz phase") Looks fine to me. So the approach (a) works fine with lists-of-lists; it only needs to be documented. (B

Re: write past end of buffer in vasnprintf() implementation of %f

2018-09-23 Thread Ben Pfaff
On Sun, Sep 23, 2018 at 02:25:50PM +0200, Bruno Haible wrote: > > The line in convert_to_decimal() cited above is the assignment here: > > > > /* Terminate the string. */ > > *d_ptr = '\0'; > > > > I guess that the space calculation passed to malloc() at the top of the > > same funct

Re: Would timevar be accepted in gnulib?

2018-09-23 Thread Akim Demaille
Hi! > Le 23 sept. 2018 à 15:08, Bruno Haible a écrit : > > Hi Akim, > >>> What do you think? Do you think the list-of-lists use-case makes sense? >>> Do you think configuring the list at run time is something people may want >>> to do? >> >> You have a strong point here. But I don’t know if t

Re: Would timevar be accepted in gnulib?

2018-09-23 Thread Bruno Haible
Hi Akim, > > What do you think? Do you think the list-of-lists use-case makes sense? > > Do you think configuring the list at run time is something people may want > > to do? > > You have a strong point here. But I don’t know if there would > be actual users for such dynamic timers. OK, no dyna

Re: write past end of buffer in vasnprintf() implementation of %f

2018-09-23 Thread Bruno Haible
Ben Pfaff wrote: > CC='gcc -fsanitize=address -g -O0' ./gnulib-tool --test vasnprintf > vasnprintf-posix A couple of notes about this report: 1) The -O0 in the above command is ineffective. Reason: CFLAGS is '-O2 -g' by default, thus when a file gets compiled by $CC $CFLAGS, the -O2 always

Re: Would timevar be accepted in gnulib?

2018-09-23 Thread Akim Demaille
Hi Bruno! > Le 23 sept. 2018 à 11:42, Bruno Haible a écrit : > > Hi Akim, > >> I’m not sure I understand what you mean here. The timers are >> used in many places in the code, not just main(). We need some >> global definition somewhere, and we want to iterate over them >> when displaying the

Re: write past end of buffer in vasnprintf() implementation of %f

2018-09-23 Thread Bruno Haible
Hi Ben, > When I apply the following patch to gnulib: > > -- > diff --git a/tests/test-vasnprintf.c b/tests/test-vasnprintf.c > index 19731bc93378..105ac24c94a3 100644 > --- a/tests/test-vasnprintf.c > +++ b/tests/test-vasnprintf

Re: Would timevar be accepted in gnulib?

2018-09-23 Thread Bruno Haible
Addendum: > Note that (c), like (a), has the benefit that adding a new timevar is a > modification in a single place. This is true only if all uses of the timevars are in a single C compilation unit (e.g. the top-level). If the user wants to use them in different source files, it requires 2 modifi

Re: Would timevar be accepted in gnulib?

2018-09-23 Thread Bruno Haible
Hi Akim, > > 1) Simplify. I don't see the point of the DEFTIMEVAR layer with the enum. > > Couldn't the code just do > > timevar_t tv_total; > > timevar_t tv_reader; > > .. > > and > > init_timevar (); > > timevar_start (&tv_total); > > > > timevar_push (&tv_reader); >