This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Avoid segfault on invalid directory table



On 03/24/2017 08:26 AM, Pedro Alves wrote:
> 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://urldefense.proofpoint.com/v2/url?u=https-3A__sourceware.org_ml_gdb-2Dpatches_2017-2D03_msg00444.html&d=DwIDaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=IRyzGZVy_JZ1hqY1erVdUg&m=vs5e-LmOdHODMsuSCzBW-ZmATTGCvlUF_g5zTPBZOrg&s=xgu4H5IZ76MWdl6vuMFxqYhOV_jshZnaDrB6bw6Gd94&e= 
>
> (I see now that I mistakenly named you as author of that commit.
> Sorry about that.  I've fixed it locally.  :-) )

That patch produces a good backtrace against the problematic binary.

cheers,
Pádraig


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]