This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] xml_fetch_content_from_file: Read in whole file in one go (Re: [pushed] Fix double-free corruption)
- From: Pedro Alves <palves at redhat dot com>
- To: John Baldwin <jhb at freebsd dot org>, gdb-patches at sourceware dot org
- Date: Thu, 19 Oct 2017 15:27:43 +0100
- Subject: Re: [PATCH] xml_fetch_content_from_file: Read in whole file in one go (Re: [pushed] Fix double-free corruption)
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=palves at redhat dot com
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 156634A702
- References: <1508240517-15322-1-git-send-email-palves@redhat.com> <199a50c3-4f55-c40e-7dcf-47db0ef27798@redhat.com> <2811735.d9V1pPNBEL@ralph.baldwin.cx>
On 10/18/2017 06:43 PM, John Baldwin wrote:
> On Tuesday, October 17, 2017 01:20:14 PM Pedro Alves wrote:
>> Looking a bit deeper, I can't seem to find a reason this code is
>> reading in chunks in the first place? Why not read it all in one
>> go? Like patch below.
>
> Seems sensible. It's unlikely that an XML file will be stored directly
> on a tape such that seek() is non-optimal. :)
>
:-)
Thanks much for the review. I pushed this in now.
--
Pedro Alves