Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@mvista.com>
To: gdb-patches@sources.redhat.com
Subject: Re: [PATCH/RFC] Reorganize osabi.c:generic_elf_osabi_sniff_abi_tag_sections()
Date: Mon, 19 Jan 2004 19:15:00 -0000	[thread overview]
Message-ID: <20040119185317.GA20236@nevyn.them.org> (raw)
In-Reply-To: <200401191839.i0JId3oh000527@elgar.kettenis.dyndns.org>

On Mon, Jan 19, 2004 at 07:39:03PM +0100, Mark Kettenis wrote:
>    Date: Sun, 18 Jan 2004 17:52:54 -0500
>    From: Daniel Jacobowitz <drow@mvista.com>
> 
>    On Sun, Jan 18, 2004 at 09:40:40PM +0100, Mark Kettenis wrote:
>    > +  /* ...and check it.  */
>    > +  gdb_assert (notesz <= MAX_NOTESZ);
>    > +  if (notesz > bfd_section_size (abfd, sect))
>    > +    return 0;
> 
>    I'd rather not add assertions based on the input file.  Can we complain
>    and fail instead?
> 
> Ah, but the assert is an internal consistency check.  It checks
> whether the MAX_NOTESZ limit is large enough for the note the caller
> of check_note() is checking for.  Basically the assert triggers if
> someone adds a check_note() call with a long name, or a large
> descriptor size.  In that case the person in question should increase
> MAX_NOTESZ.  The assert is guaranteed not to be triggered for the
> check_note() calls in my patch.

Oh, you're right - I leapt to the conclusion that this was based on the
size of notes in the input.  Sorry.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


  reply	other threads:[~2004-01-19 19:15 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-18 20:40 Mark Kettenis
2004-01-18 22:52 ` Daniel Jacobowitz
2004-01-19 18:39   ` Mark Kettenis
2004-01-19 19:15     ` Daniel Jacobowitz [this message]
2004-01-21 23:08       ` Mark Kettenis
2004-01-22  7:35         ` Eli Zaretskii

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=20040119185317.GA20236@nevyn.them.org \
    --to=drow@mvista.com \
    --cc=gdb-patches@sources.redhat.com \
    /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