This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Avoid segfault on invalid directory table
- From: Pedro Alves <palves at redhat dot com>
- To: Padraig Brady <pbrady at fb dot com>, gdb-patches at sourceware dot org
- Date: Fri, 24 Mar 2017 15:26:58 +0000
- Subject: Re: [PATCH] Avoid segfault on invalid directory table
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=palves at redhat dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com B0677624A9
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com B0677624A9
- References: <6c10a81a-b9fe-cd6b-0adc-85fc7b596c1d@fb.com>
Hi Pádraig,
On 03/24/2017 04:09 AM, Padraig Brady wrote:
> gdb was segfaulting during backtrace on a binary here,
> where fe->dir_index parsed from the dwarf info was seen to
> access beyond the provided include_dirs array.
> The attached bounds the access to entries actually written to the array,
> and was verified to output the backtrace correctly.
>
Thanks, I pushed it.
Note that AFAICS, Facebook has as couple copyright assignments in place,
but none covers you for GDB. The patch was sufficiently small that it
shouldn't be a problem this time. But it'd be appreciated if that
was sorted out if you plan on contributing more.
And also, could you give this patch a try? :
https://sourceware.org/ml/gdb-patches/2017-03/msg00444.html
(I see now that I mistakenly named you as author of that commit.
Sorry about that. I've fixed it locally. :-) )
Thanks,
Pedro Alves