This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Dynamic growable arrays for internal use
- From: Florian Weimer <fweimer at redhat dot com>
- To: Carlos O'Donell <carlos at redhat dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Fri, 2 Jun 2017 12:04:14 +0200
- Subject: Re: [PATCH] Dynamic growable arrays for internal use
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=fweimer at redhat dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com D0D473DE3D
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com D0D473DE3D
- References: <edae68d6-998b-58a6-a8df-82703341da23@redhat.com> <ce479249-6362-6a58-ec9b-d6227ef99db9@redhat.com> <eb0d4e4f-1294-5b32-e9e8-004edebca698@redhat.com> <e8ac9c11-212d-dab1-4ada-d5feeae06531@redhat.com>
On 06/02/2017 09:37 AM, Carlos O'Donell wrote:
> In summary the remaining points look like this:
>
> * Add rationale to malloc/dynarray.h as a comment explaining when and
> why you would use it instead of a scratch buffer. What you write below
> with some adjustments is good.
Okay, I added comments to dynarray.h.
>> diff --git a/support/capture_subprocess.h b/support/capture_subprocess.h
>> new file mode 100644
>> index 0000000..3265d63
>> --- /dev/null
>> +++ b/support/capture_subprocess.h
>> +/* Invoke CALLBACK (CLOSURE) in a subprocess and capture standard
>> + output, standard error, and the exit status. The out.buffer and
>> + err.buffer members in the result are null-terminated strings which
>> + can be examined by te caller. (out.out and err.out are NULL.) */
>
> s/te/the/g.
>
> Suggest:
> can be examined by the caller (out.out and err.out are NULL).
Thanks, fixed.
>> +
>> +#include <support/test-driver.c>
>> diff --git a/support/xdup2.c b/support/xdup2.c
>> new file mode 100644
>> index 0000000..f4a3759
>> --- /dev/null
>> +++ b/support/xdup2.c
>> @@ -0,0 +1,28 @@
>> +/* pipe with error checking.
>
> s/pipe/dup2/g
Fixed.
I adjusted the patch to the presence of check_mul_overflow_size_t in
<malloc-internal.h> and committed it.
Florian