public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: gdb-patches@sourceware.org
Subject: Re: [PATCH] dwarf2read.c: Clean up out of bounds handling
Date: Mon, 27 Mar 2017 15:06:00 -0000	[thread overview]
Message-ID: <82423b71-787d-fd65-bf86-27d37fe2102c@redhat.com> (raw)
In-Reply-To: <1490369067-11867-1-git-send-email-palves@redhat.com>

On 03/24/2017 03:24 PM, Pedro Alves wrote:
> From: Pádraig Brady <pbrady@fb.com>

The above was automatically inserted by git send-email, because
I had messed up the commit's git author locally.  I've fixed it
locally (I'm the author) ...

> Multiple places in dwarf2read.c open code 1-based to 0-based index
> conversion and check for out of bounds accesses to lh->include_dirs
> and lh->file_names.  This commit factors those out to a couple methods
> and uses them throughout.
> 
> gdb/ChangeLog:
> 	* dwarf2read.c (file_entry) <dir_index>: Add comment.
> 	(file_entry::include_dir): New method.
> 	(line_header::include_dir_at, line_header::file_name_at): New
> 	methods.
> 	(setup_type_unit_groups, setup_type_unit_groups)
> 	(psymtab_include_file_name): Simplify using the new methods.
> 	(lnp_state_machine) <the_line_header>: New field.
> 	<file>: Add comment.
> 	(lnp_state_machine::current_file): New method.
> 	(init_lnp_state_machine): Initialize the "the_line_header" field.
> 	(dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
> 	Simplify using the new methods.

... and pushed to master, after Pádraig confirmed gdb still gracefully
handles the problematic binary:

  https://sourceware.org/ml/gdb-patches/2017-03/msg00451.html

Thanks,
Pedro Alves

      reply	other threads:[~2017-03-27 15:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-24 15:24 Pedro Alves
2017-03-27 15:06 ` Pedro Alves [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=82423b71-787d-fd65-bf86-27d37fe2102c@redhat.com \
    --to=palves@redhat.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).